Ben Chuanlong Du's Blog

And let it direct your passion with reason.

Account Management in Linux

** Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement! **

Create a User

Both adduser and useradd can be used to create a new user. adduser is interactive while useradd is non-interactive. It is suggested that you use useradd in batch mode and adduser in non-batch mode.

useradd -o -m -u -g -d 
groupadd -o -g 

Group

Add a user to a group.

gpasswd -a user_name group_name

Get information about a group.

getent group group_name
getent group group_id

Comments