Skip to main content

User administration and Group administration in Linux

 User Administration in Linux

Syntax: useradd <username>

Configuration File: /etc/passwd


User Administration with customization

Syntax: useradd <option> <argument> <username>


Options:

u - UID

g - GID

c - Comment

d - home directory

b - base directory

-e account expiry 

-o non unique

-G make member of secondary group

-r system user

-s user login shell


User modification 

Syntax: usermod <option> <argument> <username>


Options:

u - UID

g - GID

c - Comment

d - home directory

b - base directory

-e account expiry 

-o non unique

-G make member of secondary group

-r system user

-s user login shell


User password management

Syntax: passwd <username>

             chpasswd

Configuration file: /etc/shadow

 

Group Administration

Syntax: groupadd <groupname>

Configuration file: /etc/groups


User account delete and group delete

Syntax: userdel  -r  <username>

Syntax: groupdel  -r  <groupname>

Comments