User account management mainly has the following several configuration files:/etc/passwd,/etc/shadow,/etc/group and user mailbox/var/spool/mail, today is important to explain/etc/passwd and/etc/ Shadow two configuration files
/ETC/PASSWD: Records all the accounts on the Linux system
/etc/shadow: Record the password for all accounts
Below to understand what each paragraph in the configuration file means,
Http://i2.51cto.com/images/blog/201805/26/a934831143e72c9633d0997e88efe591.png?x-oss-process=image/watermark, size_16,text_qduxq1rp5y2a5a6i,color_ffffff,t_100,g_se,x_10,y_10,shadow_90,type_zmfuz3pozw5nagvpdgk=
The contents of the/etc/passwd configuration file are divided into 7 segments separated by colons, respectively:
1. User Name
2.X: Early in this section is the user login password, now the password is put into the/etc/shadow
3.UID:0 represents the system administrator, 1~999 reserved for the system to use the id,1000 above to the general user
4.GID:0 represents the system administrator, 1~999 reserved for the system to use the id,1000 above to the general user
5. User's information description
6. User home directory, the directory where the user logged in
7./bin/bash: When the user is logged in, the shell can be used, and if the shell cannot be used, the/sbin/nologin will be displayed.
The contents of the/etc/shadow configuration file are separated by colons into 9 segments, respectively:
1. User Name
2. Encrypted password (* Indicates the user is locked,!) indicates no encryption)
3. Date of recent password change: the date in Linux is the cumulative date of January 1, 1970
4. The number of days the password cannot be modified, 0 means it can be modified at any time
5. The number of days the password needs to be modified, you can force the password change by modifying the value
6. Number of days the password needs to be changed, 7 indicates the number of days the system will issue a warning to the user
7. The time that the password expires payback can be used
8. The expiration date of the account, the date of the cumulative start of January 1, 1970, after the time, regardless of whether the password expires, the account can no longer use the
9. The reserved
Note: This sticker profile is based on the CENTOS7 version
Beginners Learn Linux:/etc/passwd and/etc/shadow under user account management