User Configuration Files
User Information file:/etc/passwd
Shadow files:/etc/shadow
Group information file:/etc/group
Group Password file:/etc/gshadow
View and modify user information primarily through user profiles in Linux
/etc/passwd
Account:password:UID:GID:GECOS:directory:shell
User name password flag UID GID User Description Home directory login after Shell
X means the user has a password, and the real password is in the shadow file.
uid:0 Superuser, 1-499 system users (also known as pseudo-user, cannot delete, system crashes after deletion), 500-65535 ordinary users, if the UID is changed to 0, then the ordinary user becomes the administrator user
GID: User initial group ID can view the user group of the GID in the/etc/group file
GECOS: User description, equivalent to remark
Directory: Home directory normal User:/home/username/Super User:/root/
Shell: Shell after login for/bin/bash pseudo-user/sbin/nologin if you want to disable a user, you can change the shell to/sbin/nologin, the user cannot log on
/etc/shadow
Username: encryption Password: Password Last modified: Two password modification interval (compared to the 3rd field): Password validity period (compared to the 3rd field): The number of days before password modification expires (compared to the 5th field): The number of days to expire after the password expires (compared to the 5th field): Account expiry time: Reserved
Encrypted password: If the password is "!!" or "*", which means no password, no login
Password Last modified: Use January 1, 1970 as standard Time, every day time stamp plus 1
Two times Password modification interval: The default is 0, if it is 3, the last password change after 3 days to change the password again
Password expiration: Default 99999, if you want a user to change the password every 90 days, the value is set to 90
Number of warning days before password modification expires: 7, which is the 7 day remaining prompt
Grace days after password expiration: If 5, you will still be able to log in 5 days after expiration, 0 will expire immediately after the password expires-1 means the password never expires
Account Expiration Time: The time stamp indicates how long the password is valid, expire immediately after expiration, regardless of the password expiration date
Timestamp conversion formula: date-d "1970-01-01 16066 Days"
/etc/group
Group name: group Password flag: GID: Additional user in Group
/etc/gshadow
Group name: Group Password: Group Administrator user name: additional users in Group
Home Directory
Normal User:/home/user name/, owner and owning group are this user, permissions 700
Superuser:/root/, owner and owning group are root users, permissions are 550
If the normal user is changed to Superuser, then the home directory is still a normal user directory
User's mailbox
/var/spool/mail/User name/
User Templates Directory
/etc/skel/
For example, in the Skel directory to write a warning message file, then after the new user, it will default in the user's home directory to automatically generate such a file.
Introduction to System user profiles for Linux servers