Excerpt from: http://www.runoob.com/linux/linux-user-manage.html
1. Currently owning user
cat/etc/shadow//Login: Encrypted password: Last modified: Minimum time interval: Maximum time interval: Warning Time: Inactivity time: Expiry time: Flag cat/etc/passwd//User name: password: User id: Group ID: annotative Description: Home directory: Login shellcat/etc/group//Group name: password: Group ID: List of users in the group
2. User, group Add delete
useradd-d/home/nginx-m nginx-g nginx//-d directory Specifies the home directory, and if this directory does not exist, the-m option is used to create the master directory. The-G user group specifies the user group to which the user belongs. Userdel-r Nginx-r, its role is to remove the user's home directory. Groupadd group1//adds a new group group1 to the system, and the group identification number of the new group is added 1 on the basis of the currently existing maximum group identification number. GROUPADD-G 101 group2//Adds a new group group2 to the system, specifying that the group identification number for the new group is 101. Groupdel nginx//Delete Group Nginx
3. Modifications
Usermod-s/bin/ksh-d/home/nginx-g Samba nginx user Nginx login Shell modified to Ksh, the main directory changed to/home/samba, the user group changed to samba.
4. Password
passwd option Username-l locks the password, which disables the account. -u password to unlock. -D make the account no password. "Login without password" -F forces the user to change the password the next time they log on. passwd//No parameter, modify current user password passwd nginx//modify nginx Password
Linux User Management