Wednesday, June 15, 2011

CentOS5/RHEL5 User Administration


1) Add User
Useradd
2)      Delete user
Userdel
3)      Modify user
Usermod
4) Add Group
gpasswd
5) Delete group
groupdel
6) Modify group
groupmod
7) Add User to Group
Use useradd command to add new users to existing group (or create a new group and then add user). If group does not exist, create it. Syntax:
Syntax:
useradd -G {group-name1},{group-name2} username (for secondary group)
useradd -g {group-name} username (for primary group)
useradd1