1, Build Users:
AddUser PHPQ//New PHPQ User
passwd PHPQ//Set password for PHPQ user
2. Build Working Group
Groupadd test//New test Workgroup
3, new users at the same time increase the Working group
USERADD-G test PHPQ//new PHPQ user and added to test workgroup
Note::-G belongs to the group-D home Directory-S used by the shell
4. Increase the Working Group for existing users
USERMOD-G groupname username
Or: Gpasswd-a user Group
5. Temporary shutdown : The second field (password) in the/etc/shadow file that belongs to the user is preceded by a *. To restore the user, remove the *.
Or, use the following command to close the user account:
passwd peter–l
Re-release:
passwd Peter–u
6. Permanently delete user account
Userdel Peter
Groupdel Peter
Usermod–g Peter Peter (Force delete all files and subdirectories in the user's home directory and home directory)
7. Remove users from the group
Edit/etc/group Find the GROUP1 line, delete A
or with a command.
gpasswd-d A GROUP
8, display user information
id user
cat/etc/passwd