Thursday, July 04, 2013

Adding existing user to a group in Ubuntu

Example below adds user timus to the group www-authors

$: sudo usermod -a -G www-authors timus

To add user timus to sudoers group, do:

$: sudo usermod -a -G sudo timus

Note that for the sudo to take effect you have to logout and log back in.

Tested on:
- Lubuntu (13.04)
- Ubuntu (12.04 - 13.04)

References:
http://www.cyberciti.biz/faq/howto-linux-add-user-to-group/
http://askubuntu.com/questions/7477/how-can-i-add-a-new-user-as-sudoer-using-the-command-line


No comments: