Results 1 to 6 of 6

Thread: A close call (usermod -G)

  1. #1
    Join Date
    Jan 2005
    Location
    South Africa
    Beans
    2,098
    Distro
    Ubuntu 12.04 Precise Pangolin

    A close call (usermod -G)

    Nearly borked my system this morning trying to help a user here.

    I ran usermod -G www-data wim to add the only adminstrative user to the www-data group. This wiped all additional groups that the user was a member of (including sudo) Luckily I checked, and because sudo remembered the password and I did not close the terminal yet, I could correct the situation.

    Close, very very close.

    The correct command is, by the way, usermod -aG www-data wim
    If you don't make backups of your important data, your data is obviously not important to you.

  2. #2
    Join Date
    Apr 2012
    Beans
    7,256

    Re: A close call (usermod -G)

    yes I've started to use/recommend using gpasswd (which adds the user to the group) instead for that exact reason

    Code:
    gpasswd --add wim www-data

  3. #3
    Join Date
    Jan 2005
    Location
    South Africa
    Beans
    2,098
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: A close call (usermod -G)

    Thanks, I will try to remember that command

    It would, by the way, not have happend if there would have been an obvious way in system settings -> user accounts to simply add / remove users to /from groups. There might be a way but I simply did not see it.

    Will make another thread about that.
    If you don't make backups of your important data, your data is obviously not important to you.

  4. #4
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: A close call (usermod -G)

    You could also install gnome-system-tools, then run users-admin to get the old Users & Groups interface back.

  5. #5
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    privilege separation

    www-data usually shouldn't contain any regular users. It is reserved by the http server for privilege separation so that parts of it can run unprivileged.

  6. #6
    Join Date
    Jan 2005
    Location
    South Africa
    Beans
    2,098
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: privilege separation

    gnome-system-tools is now installed; currently researching how to integrate it in gnome-control-center (if at all possible).

    And I know it was not the optimal solution to make a user a member of www-data; the final solution for the problem was therefore also different.
    If you don't make backups of your important data, your data is obviously not important to you.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •