Seventh chapter-User and user group Management one. User Profile 1. User Information file/etc/passwd:
(1) User Management Introduction: So the more server security requirements of the server, the more need to establish a reasonable level of user rights and server operating norms.
In Linux, user information is viewed and modified primarily through user profiles. (2)/etc/passwd:
(3) Initial and additional groups:
(4) What the shell is:
2. Shadow file/etc/shadow:
(1) Shadow file/etc/shadow:
(2) time stamp conversion:
3. Group information file/etc/group and group password file/etc/gshadow:
(1) Group information file/etc/group:
(2) Group password file/etc/gshadow:
Two. User Management related files
(1) User's home directory: normal User:/home/user name/, owner and owning group are this user, permission is 700;
Superuser:/root/, owner and owning group are root users, permissions are 550
(2) User's email:/var/spool/mail/User name/
(3) User Template directory:/etc/skel/
Three. User management commands 1. User add Command useradd:
(1) Useradd command format:
(2) Add Default User:
(3) Specify options to add Users:
(4) User default value file:
2. Modify User password passwd:
(1) passwd command format:
(2) Check the status of the password:
(3) lock user and unlock User:
(4) Use a string as the user's password:
3. Modify user information Usermod Modify user password status Chage
(1) Modify user information Usermod:
(2) Modify user password status chage:
4. Delete user Userdel, user switch command su:
(1) Delete user userdel:
(2) Manually delete the user:
(3) View User id:
(4) Switch user identity su:
Four. User group management Commands 1. Add a user group:
2. Modify user groups:
3. Delete user groups: (no initial user allowed, allow additional users to exist)
4. Add the user to the group or remove it from the group:
Basic Linux Learning (7)