1. User's additions and deletions change
Useradd Xiaoguo Create a user
Passed Xiaoguo Modify or add a password
Userdel Xiaoguo Delete a user
NL Shadow
NL passwd
RM-RF testuser Delete the directory where the user testuser is located
Usermod-l Xiaoguo Lock User
Usermod-u Xiaoguo Unlock user//nl/etc/shadow Remove the password in front of!
USERMOD-G root Xiaoguo Modify user groups
Groupmod-n xiaoguogroup Xiaoguo Modify Group name
ID Xiaoguo Viewing the user's basic information
Chage-l Xiaoguo Viewing the user's basic information
Chage-d 2013-02-18 Student Modify the time the user last modified
Problems you may encounter:
# #在容器里面修改用户密码的时候报错:
/usr/share/cracklib/pw_dict.pwd:no such file or directory
Pwopen:no such file or directory
Solve:
yum-y Reinstall Cracklib-dicts
2. Permissions of the user
Drwxrwxrwx
First letter: representing the file type
2nd to 4th character: represents the current user's permissions
5th to 7th character: represents the current user group permissions
8th to 10th character: Represents the permissions of other users
chmod command
A: All rights/All users
U: User
G: User Group
O: Other users
+: Plus permissions
-: Subtract Permissions
=: equals permission
Eg: add executable permissions to file file.txt
chmod a+x file.txt
0: No Permissions
1:x
2:w
3:xw
4:r
5:rx
6:rw
7:rwx
This article is from the "Zhang Xiao" blog, make sure to keep this source http://benchmarking.blog.51cto.com/12343634/1878055
Linux User and Rights management