Ubuntu Users and Groups

I found these commands very useful when adding users and group via the command line.

If you want to add a new user to the system. This is a standard user
adduser username

Add existing user tony to ftp supplementary/secondary group with usermod command using -a option ~ i.e. add the user to the supplemental group(s). Use only with -G option
usermod -aG www-data tony

Change existing user tony primary group to www:
usermod -g www tony

Adding a group is done similarly with this command
addgroup groupname

Add user to group can also be done like this
adduser username groupname


Popular posts from this blog

Console over SSH (ONTAP)

Brocade Zone Setup

vFoglight Purge Stale Objects (Groovy Script)