- bookworm 1:4.13+dfsg1-1+b1
- testing 1:4.16.0-7
- unstable 1:4.16.0-7
- experimental 1:4.17.0~rc1-2
SHADOW(5) | File Formats and Configuration | SHADOW(5) |
名称¶
shadow - 影子化了的密码文件
描述¶
shadow is a file which contains the password information for the system's accounts and optional aging information.
如果没有维护好密码安全,此文件绝对不能让普通用户可读。
Each line of this file contains 9 fields, separated by colons (“:”), in the following order:
login name
encrypted password
A password field which starts with an exclamation mark means that the password is locked. The remaining characters on the line represent the password field before the password was locked.
Refer to crypt(3) for details on how this string is interpreted.
If the password field contains some string that is not a valid result of crypt(3), for instance ! or *, the user will not be able to use a unix password to log in (but the user may log in the system by other means).
date of last password change
The value 0 has a special meaning, which is that the user should change her password the next time she will log in the system.
空字段表示密码年龄功能被禁用。
minimum password age
An empty field and value 0 mean that there is no minimum password age.
maximum password age
这写天之后,密码仍然可用。用户将会在下次登录的时候被要求更改密码。
空字段表示没有最大密码年龄,没有密码警告时间段,没有密码禁用时间段(请看下边)。
如果最大密码年龄小于最小密码年龄,用户将会不能更改密码。
password warning period
空字段或者 0 表示没有密码警告期。
password inactivity period
After expiration of the password and this expiration period is elapsed, no login is possible for the user. The user should contact her administrator.
空字段表示没有强制密码过期。
account expiration date
Note that an account expiration differs from a password expiration. In case of an account expiration, the user shall not be allowed to login. In case of a password expiration, the user is not allowed to login using her password.
空字段表示账户永不过期。
应该避免使用 0,因为它既能理解成永不过期也能理解成在1970年1月1日过期。
reserved field
文件¶
/etc/passwd
/etc/shadow
/etc/shadow-
注意,此文件由 shadow 工具集使用,而不是所有的用户和密码管理工具都会使用。
参见¶
chage(1), login(1), passwd(1), passwd(5), pwck(8), pwconv(8), pwunconv(8), su(1), sulogin(8).
2024-08-05 | shadow-utils 4.16.0 |