),来源:http://imysql.cn,转载请注明作/译者和出处,并且不能用于商业用途,违者必究。[root@localhost ~]# cat /etc/shadow | grep yejr yejr:$1$e0l45aJc$B3pfnFsKsxRFpI9apJ8mS1:13746:0:99999:7:::
使用者名称,最多 8 个符号,可以用大小写,通常都是小写。直接对应 /etc/passwd 档案中的使用者名称。 密码,加密过的 13 个字元。空格 (就是 ::) 表示登入时不需密码 (不是个好主意),"*" 项目 (就是 :*:) 指出帐号已经关闭。 密码最後一次变更起所经过的日数 (从 1970-1-1 起 ) 密码经过几天可以变更 (0 表示可以随时变更) 密码经过几天必须变更 (99999 表示使用者可以保留他们的密码很多很多年不变) 密码过期之前几天开始要警告使用者 密码过期几天后帐号会被取消 从 1970-1-1 起,帐号经过几天会被取消 保留位
# Password aging controls: # # PASS_MAX_DAYS Maximum number of days a password may be used. # PASS_MIN_DAYS Minimum number of days allowed between password changes. # PASS_MIN_LEN Minimum acceptable password length. # PASS_WARN_AGE Number of days warning given before a password expires. # PASS_MAX_DAYS 42 PASS_MIN_DAYS 0 PASS_MIN_LEN 8 PASS_WARN_AGE 10
[root@localhost ~]# passwd -x 42 -w 10 yejr Adjusting aging data for user yejr. passwd: Success
[root@localhost ~]# cat /etc/shadow | grep yejr yejr:$1$e0l45aJc$B3pfnFsKsxRFpI9apJ8mS1:13746:0:99999:7:::
[root@localhost ~]# /usr/sbin/vipw yejr:$1$e0l45aJc$B3pfnFsKsxRFpI9apJ8mS1:14012:0:42:10:::
http://slackware.osuosl.org/slackware-3.3/docs/Shadow-Password-HOWTO
http://www.comptechdoc.org/os/linux/howlinuxworks/linux_hlshadow.html
















