Users manage

From Wiki

Jump to: navigation, search

Adding and Removing Users

Its also worth taking a look in /etc/passwd for listing of users.

adduser blah
userdel blah
groupadd users          //Create a Group
adduser username users  //Add a Member into the above group (Not making it their primary group)

//Putting a user into a group manually. This will not make it their primary group!
vi /etc/group

Make the newgroup the PRIMARY one for the user:
Particularly useful, as adding a user into a group will not change their primary group!!

usermod -g newgroup user
Add a NEW user into an EXISTING Group
//This is what should be normally done, as it makes users their PRIMARY group, instead of making a new one!!
adduser --ingroup users username 

//dont know if this is essential, but add them into the groups file in /etc -
adduser username users
Add a user into a group

Instead of editing manually /etc/group, this is the preferred way:

adduser username group

Got from More info at:
and More detailed at:

Personal tools