linux-user profile-shadow file, group information file

The shadow file refers to: / etc / shadow, use vim / etc / shadow to open the file

                          

                         

Field 1: User name, Field 2: encrypted password (the encryption algorithm is upgraded to SHA512 hash encryption algorithm, if the password bit is "!!", "*" means there is no password, you can not log in, you can precede the password field in the file Add! Makes the password invalid), field 3: the date of the last modification of the password (using January 1, 1970 as the standard time, and the timestamp is increased by 1 every day) Field 4 means: the interval between two password changes (and Field 3), Field 5: Password validity period (compared to Field 3), Field 6: Warning days before password modification expires (Compared with Field 5), Field 7: After password expires Days of grace (compared to field 5, 0 means that the password will expire immediately after it expires, -1 means that the password will never expire.), Field 8: account expiry time (to be represented by time stamp), field 9: Keep

Timestamp conversion date: date -d "1970-01-01 timestamp days"

Convert date to timestamp: echo $ (($ (date --date = "time" +% s) / 86400 + 1))

  

The group information file / etc / group is entered using the vim command

                   

Field 1: Group name, Field 2: Group password flag, Field 3: GID, Field 4: Attached files in the group

Group password file / etc / gshadow use vim command to enter

Field 1: Group name, Field 2: Group password, Field 3: Group administrator username, Field 4: Additional users in the group

Published 148 original articles · Like 10 · Visitors 20,000+

Guess you like

Origin blog.csdn.net/ab1605014317/article/details/105018865