Professional Documents
Culture Documents
User Admin
User Admin
User Admin
User information is parsed from /etc/passwd file at login and the base environment variables are set.
/etc/password, /etc/shadow
These files are the critical files that contain all of the user information for your system /etc/passwd is world readable, /etc/shadow is readable by root only. Why?
/etc/shadow contains the encrypted password string for each userid. There are password
cracking programs that will use this encrypted string to brute force guess the userid password.
/etc/passwd Format
7 fields Userid:Password string:UID:GID:Name field:home directory location:default shell Userid the login id of the user account Password string a marker X, in older Unix systems this is where the encrypted password string would have been stored.
/etc/passwd Format
UID unique number that identifies the userid. The OS uses this NOT the username to identify an account. GID unique number identifying the group the userid belongs to. Name field name of the account owner Home directory location where the default home directory for this userid is located. Default shell the default shell activated upon logging into the system
Adding Users
Admintool is the main GUI that handles user management. useradd command adds a new user. Command line:
useradd d dir u uid s shell g group c comment username These are the most common flags but there are others. See the man page.
Modifying Users
Admintool is the preferred method. /usr/sbin/usermod is the command line version. Command line:
/usr/sbin/usermod u uid g group s
shell userid
There are more flags but these are the most common ones used.
Deleting Users
Admintool is the preferred method The userdel command deletes a user from the system and modifies /etc/passwd, /etc/group, /etc/shadow appropriately. Command line:
/usr/sbin/userdel r userid The r option deletes the users home directory.
Adding/modifying Groups
Admintool GUI is the first choice. groupadd command creates a new group. Command line:
/usr/sbin/groupadd g gid groupname
Deleting Groups
Admintool is the preferred method (duh!) The groupdel command deletes a group from the system. Command line:
/usr/sbin/groupdel group