Files
2026-02-02 07:32:15 +01:00

150 lines
5.1 KiB
Plaintext

'\" t
.\" Title: shadow
.\" Author: Julianne Frances Haugh
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\" Date: 2026-02-01
.\" Manual: File Formats and Configuration Files
.\" Source: shadow-utils 4.19.3
.\" Language: Chinese Simplified
.\"
.TH "SHADOW" "5" "2026-02-01" "shadow\-utils 4\&.19\&.3" "File Formats and Configuration"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "名称"
shadow \- 影子化了的密码文件
.SH "描述"
.PP
shadow
is a file which contains the password information for the system\*(Aqs accounts and optional aging information\&.
.PP
如果没有维护好密码安全,此文件绝对不能让普通用户可读。
.PP
Each line of this file contains 9 fields, separated by colons (\(lq:\(rq), in the following order:
.PP
\fBlogin name\fR
.RS 4
It must be a valid account name, which exists on the system\&.
.RE
.PP
\fBencrypted password\fR
.RS 4
If the password field is empty, the user can log in without a password\&. However, some applications that read the
/etc/shadow
file might block access if the password field is empty\&.
.sp
If the password field begins with an exclamation mark
\fI!\fR, the password is locked\&. The remaining characters on the line represent the password field before the password was locked\&.
.sp
Refer to
\fBcrypt\fR(3)
for details on how this string is interpreted\&.
.sp
If the password field contains a string that is not a valid result of
\fBcrypt\fR(3), for instance ! or *, the user cannot use a UNIX password to log in\&. However, the user may log in the system by other means\&.
.RE
.PP
\fBdate of last password change\fR
.RS 4
The date of the last password change, expressed as the number of days since 1970\-01\-01 00:00:00 UTC\&.
.sp
The value 0 indicates that the user must change their password the next time they log in to the system\&.
.sp
空字段表示密码年龄功能被禁用。
.RE
.PP
\fBminimum password age\fR
.RS 4
The minimum password age is the number of days the user must wait before they can change their password again\&.
.sp
An empty field and value 0 mean that there is no minimum password age\&.
.RE
.PP
\fBmaximum password age\fR
.RS 4
The maximum password age is the number of days after which the user must change their password\&.
.sp
After this number of days has elapsed, the password may still be valid\&. The user is prompted to change their password at the next login\&.
.sp
空字段表示没有最大密码年龄,没有密码警告时间段,没有密码禁用时间段(请看下边)。
.sp
如果最大密码年龄小于最小密码年龄,用户将会不能更改密码。
.RE
.PP
\fBpassword warning period\fR
.RS 4
The number of days before a password expires (see the maximum password age above) during which the user is warned\&.
.sp
An empty field and value 0 mean that there is no password warning period\&.
.RE
.PP
\fBpassword inactivity period\fR
.RS 4
The number of days after a password expires (see the maximum password age above) during which the password is still accepted, and the user must update their password at the next login\&.
.sp
After the password expires and the password inactivity period elapses, the user cannot log in and must contact their administrator\&.
.sp
An empty string means that no inactivity period is enforced\&.
.RE
.PP
\fBaccount expiration date\fR
.RS 4
The date when the account expires, expressed as the number of days since 1970\-01\-01\&.
.sp
Note that account expiration differs from password expiration\&. Account expiration prevents the user from logging in, whereas password expiration only prevents users from logging in with their password\&.
.sp
An empty field means that the account never expires\&.
.sp
The value 0 should not be used, as it is interpreted either as an account with no expiration or as an expiration date of 1970\-01\-01\&.
.RE
.PP
\fBreserved field\fR
.RS 4
此字段保留作将来使用。
.RE
.SH "文件"
.PP
/etc/passwd
.RS 4
用户账户信息。
.RE
.PP
/etc/shadow
.RS 4
安全用户账户信息。
.RE
.PP
/etc/shadow\-
.RS 4
/etc/shadow 的备份文件。
.sp
注意,此文件由 shadow 工具集使用,而不是所有的用户和密码管理工具都会使用。
.RE
.SH "参见"
.PP
\fBchage\fR(1),
\fBlogin\fR(1),
\fBpasswd\fR(1),
\fBpasswd\fR(5),
\fBpwck\fR(8),
\fBpwconv\fR(8),
\fBpwunconv\fR(8),
\fBsu\fR(1),
\fBsulogin\fR(8)\&.