diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2013-07-27 08:58:37 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2013-07-27 08:58:37 +0400 |
commit | ea839a52aebd6a29a8dde70412b0e7b8d68568b4 (patch) | |
tree | 10026e84c8b73d4e5ad6704ab1cb78ea7c63c305 /man/zh_CN/man5 | |
parent | 6c1662a897fd34b5b0b0174ab83552b016d05e8d (diff) | |
download | shadow-upstream.tar.gz |
Imported Upstream version 4.1.5.1upstream/4.1.5.1upstream
Diffstat (limited to 'man/zh_CN/man5')
-rw-r--r-- | man/zh_CN/man5/faillog.5 | 66 | ||||
-rw-r--r-- | man/zh_CN/man5/gshadow.5 | 103 | ||||
-rw-r--r-- | man/zh_CN/man5/limits.5 | 276 | ||||
-rw-r--r-- | man/zh_CN/man5/login.access.5 | 66 | ||||
-rw-r--r-- | man/zh_CN/man5/login.defs.5 | 770 | ||||
-rw-r--r-- | man/zh_CN/man5/passwd.5 | 178 | ||||
-rw-r--r-- | man/zh_CN/man5/porttime.5 | 93 | ||||
-rw-r--r-- | man/zh_CN/man5/shadow.5 | 149 | ||||
-rw-r--r-- | man/zh_CN/man5/suauth.5 | 138 |
9 files changed, 1839 insertions, 0 deletions
diff --git a/man/zh_CN/man5/faillog.5 b/man/zh_CN/man5/faillog.5 new file mode 100644 index 0000000..e5558ac --- /dev/null +++ b/man/zh_CN/man5/faillog.5 @@ -0,0 +1,66 @@ +'\" t +.\" Title: faillog +.\" Author: Julianne Frances Haugh +.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> +.\" Date: 2012-05-25 +.\" Manual: 文件格式和转化 +.\" Source: shadow-utils 4.1.5.1 +.\" Language: Chinese Simplified +.\" +.TH "FAILLOG" "5" "2012-05-25" "shadow\-utils 4\&.1\&.5\&.1" "文件格式和转化" +.\" ----------------------------------------------------------------- +.\" * 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 "名称" +faillog \- 登录失败的日志文件 +.SH "描述" +.PP + +/var/log/faillog +maintains a count of login failures and the limits for each account\&. +.PP +The file contains fixed length records, indexed by numerical UID\&. Each record contains the count of login failures since the last successful login; the maximum number of failures before the account is disabled; the line on which the last login failure occurred; the date of the last login failure; and the duration (in seconds) during which the account will be locked after a failure\&. +.PP +文件的结构是: +.sp +.if n \{\ +.RS 4 +.\} +.nf +struct faillog { + short fail_cnt; + short fail_max; + char fail_line[12]; + time_t fail_time; + long fail_locktime; +}; +.fi +.if n \{\ +.RE +.\} +.SH "文件" +.PP +/var/log/faillog +.RS 4 +Failure logging file\&. +.RE +.SH "参见" +.PP + +\fBfaillog\fR(8) diff --git a/man/zh_CN/man5/gshadow.5 b/man/zh_CN/man5/gshadow.5 new file mode 100644 index 0000000..4e96498 --- /dev/null +++ b/man/zh_CN/man5/gshadow.5 @@ -0,0 +1,103 @@ +'\" t +.\" Title: gshadow +.\" Author: Nicolas Fran\(,cois <nicolas.francois@centraliens.net> +.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> +.\" Date: 2012-05-25 +.\" Manual: 文件格式和转化 +.\" Source: shadow-utils 4.1.5.1 +.\" Language: Chinese Simplified +.\" +.TH "GSHADOW" "5" "2012-05-25" "shadow\-utils 4\&.1\&.5\&.1" "文件格式和转化" +.\" ----------------------------------------------------------------- +.\" * 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 "名称" +gshadow \- 影子化了的组文件 +.SH "描述" +.PP +/etc/gshadow +包含影子化了的组账户信息。 +.PP +如果没有维护好密码安全,此文件绝对不能让普通用户可读。 +.PP +此文件的每行包含逗号分隔的如下字段: +.PP +\fB组名\fR +.RS 4 +必须是系统中已经存在的有效组。 +.RE +.PP +\fB加密了的密码\fR +.RS 4 +请参考 +\fBcrypt\fR(3) +来了解关于解析此字符串的细节信息。 +.sp +If the password field contains some string that is not a valid result of +\fBcrypt\fR(3), for instance ! or *, users will not be able to use a unix password to access the group (but group members do not need the password)\&. +.sp +此密码用于不是此组成员的用户获取此组的权限。(参考 +\fBnewgrp\fR(1) +)。 +.sp +此字段可以为空,此时,只有组成员可以获取组权限。 +.sp +以叹号开始的密码字段意味着密码被锁定。该行的剩余字符表示锁定之前的密码。 +.sp +此密码取代 +/etc/group +中指定的任何密码。 +.RE +.PP +\fB管理员\fR +.RS 4 +必须是一个逗号分隔的用户名列表。 +.sp +管理员可以更改组密码和成员。 +.sp +管理员也有成员一样的权限(请看下边)。 +.RE +.PP +\fB成员\fR +.RS 4 +必须是一个逗号分隔的用户名列表。 +.sp +成员可以免密码访问组。 +.sp +You should use the same list of users as in +/etc/group\&. +.RE +.SH "文件" +.PP +/etc/group +.RS 4 +组账户信息。 +.RE +.PP +/etc/gshadow +.RS 4 +安全组账户信息。 +.RE +.SH "参见" +.PP +\fBgpasswd\fR(5), +\fBgroup\fR(5), +\fBgrpck\fR(8), +\fBgrpconv\fR(8), +\fBnewgrp\fR(1)\&. diff --git a/man/zh_CN/man5/limits.5 b/man/zh_CN/man5/limits.5 new file mode 100644 index 0000000..5ceac9e --- /dev/null +++ b/man/zh_CN/man5/limits.5 @@ -0,0 +1,276 @@ +'\" t +.\" Title: limits +.\" Author: Luca Berra +.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> +.\" Date: 2012-05-25 +.\" Manual: 文件格式和转化 +.\" Source: shadow-utils 4.1.5.1 +.\" Language: Chinese Simplified +.\" +.TH "LIMITS" "5" "2012-05-25" "shadow\-utils 4\&.1\&.5\&.1" "文件格式和转化" +.\" ----------------------------------------------------------------- +.\" * 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 "名称" +limits \- 资源限制描述 +.SH "描述" +.PP +The +\fIlimits\fR +file (/etc/limits +by default or LIMITS_FILE defined +config\&.h) describes the resource limits you wish to impose\&. It should be owned by root and readable by root account only\&. +.PP +By default no quota is imposed on \*(Aqroot\*(Aq\&. In fact, there is no way to impose limits via this procedure to root\-equiv accounts (accounts with UID 0)\&. +.PP +每行以如下格式对一个用户描述限制: +.PP + +\fIuser LIMITS_STRING\fR +.PP +或如下格式: +.PP + +\fI@group LIMITS_STRING\fR +.PP +\fILIMITS_STRING\fR +是一个串联的资源限制列表。每条限制由一个字母指示符和跟随的数字限制组成。 +.PP +可用的指示符有: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +A:最大地址空间 (KB) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +C:最大转储文件大小 (KB) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +D:最大数据大小 (KB) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +F:最大文件尺寸 (KB) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +K:文件创建掩码,由 +\fBumask\fR(2) +设置。 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +I:最高 nice 级别,(0\&.\&.\&.39 对应 20\&.\&.\&.\-19) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +L:此用户的最大登录数 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +M: max locked\-in\-memory address space (KB) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +N:最大的文件打开数 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +O:最大实时优先级 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +P:进程优先级,由 +\fBsetpriority\fR(2) +设置。 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +R: max resident set size (KB) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +S:最大栈尺寸 (KB) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +T:最大 CPU 时间 (分钟) +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +U:最大处理器数目 +.RE +.PP +例如,\fIL2D2048N5\fR +就是有效的 +\fILIMITS_STRING\fR。为了阅读方便,如下项表示同样的意思: +.sp +.if n \{\ +.RS 4 +.\} +.nf + username L2D2048N5 + username L2 D2048 N5 + +.fi +.if n \{\ +.RE +.\} +.PP +Be aware that after +\fIusername\fR +the rest of the line is considered a limit string, thus comments are not allowed\&. A invalid limits string will be rejected (not considered) by the +\fBlogin\fR +program\&. +.PP +The default entry is denoted by username "\fI*\fR"\&. If you have multiple +\fIdefault\fR +entries in your +\fILIMITS_FILE\fR, then the last one will be used as the default entry\&. +.PP +The limits specified in the form "\fI@group\fR" apply to the members of the specified +\fIgroup\fR\&. +.PP +If more than one line with limits for an user exist, only the first line for this user will be considered\&. +.PP +If no lines are specified for an user, the last +\fI@group\fR +line matching a group whose the user is a member of will be considered, or the last line with default limits if no groups contain the user\&. +.PP +要完全禁用对一个用户的限制,可以仅仅只使用一个短线\(lq\-\(rq。 +.PP +To disable a limit for a user, a single dash "\fI\-\fR" can be used instead of the numerical value for this limit\&. +.PP +Also, please note that all limit settings are set PER LOGIN\&. They are not global, nor are they permanent\&. Perhaps global limits will come, but for now this will have to do ;) +.SH "文件" +.PP +/etc/limits +.RS 4 +.RE +.SH "参见" +.PP +\fBlogin\fR(1), +\fBsetpriority\fR(2), +\fBsetrlimit\fR(2)\&. diff --git a/man/zh_CN/man5/login.access.5 b/man/zh_CN/man5/login.access.5 new file mode 100644 index 0000000..0a55b1e --- /dev/null +++ b/man/zh_CN/man5/login.access.5 @@ -0,0 +1,66 @@ +'\" t +.\" Title: login.access +.\" Author: Marek Micha\(/lkiewicz +.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> +.\" Date: 2012-05-25 +.\" Manual: 文件格式和转化 +.\" Source: shadow-utils 4.1.5.1 +.\" Language: Chinese Simplified +.\" +.TH "LOGIN\&.ACCESS" "5" "2012-05-25" "shadow\-utils 4\&.1\&.5\&.1" "文件格式和转化" +.\" ----------------------------------------------------------------- +.\" * 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 "名称" +login.access \- 登录访问控制表 +.SH "描述" +.PP +The +\fIlogin\&.access\fR +file specifies (user, host) combinations and/or (user, tty) combinations for which a login will be either accepted or refused\&. +.PP +When someone logs in, the +\fIlogin\&.access\fR +is scanned for the first entry that matches the (user, host) combination, or, in case of non\-networked logins, the first entry that matches the (user, tty) combination\&. The permissions field of that table entry determines whether the login will be accepted or refused\&. +.PP +登录访问控制表的每一行有\(lq:\(rq分隔的三个字段: +.PP +\fIpermission\fR:\fIusers\fR:\fIorigins\fR +.PP +The first field should be a "\fI+\fR" (access granted) or "\fI\-\fR" (access denied) character\&. The second field should be a list of one or more login names, group names, or +\fIALL\fR +(always matches)\&. The third field should be a list of one or more tty names (for non\-networked logins), host names, domain names (begin with "\&."), host addresses, internet network numbers (end with "\&."), +\fIALL\fR +(always matches) or +\fILOCAL\fR +(matches any string that does not contain a "\&." character)\&. If you run NIS you can use @netgroupname in host or user patterns\&. +.PP +\fIEXCEPT\fR +操作符让编写非常复杂的规则,成为可能。 +.PP +The group file is searched only when a name does not match that of the logged\-in user\&. Only groups are matched in which users are explicitly listed: the program does not look at a user\*(Aqs primary group id value\&. +.SH "文件" +.PP +/etc/login\&.defs +.RS 4 +Shadow 密码套件配置。 +.RE +.SH "参见" +.PP +\fBlogin\fR(1)\&. diff --git a/man/zh_CN/man5/login.defs.5 b/man/zh_CN/man5/login.defs.5 new file mode 100644 index 0000000..8b52e22 --- /dev/null +++ b/man/zh_CN/man5/login.defs.5 @@ -0,0 +1,770 @@ +'\" t +.\" Title: login.defs +.\" Author: Julianne Frances Haugh +.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> +.\" Date: 2012-05-25 +.\" Manual: 文件格式和转化 +.\" Source: shadow-utils 4.1.5.1 +.\" Language: Chinese Simplified +.\" +.TH "LOGIN\&.DEFS" "5" "2012-05-25" "shadow\-utils 4\&.1\&.5\&.1" "文件格式和转化" +.\" ----------------------------------------------------------------- +.\" * 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 "名称" +login.defs \- 影子密码套件配置 +.SH "描述" +.PP +The +/etc/login\&.defs +file defines the site\-specific configuration for the shadow password suite\&. This file is required\&. Absence of this file will not prevent system operation, but will probably result in undesirable operation\&. +.PP +This file is a readable text file, each line of the file describing one configuration parameter\&. The lines consist of a configuration name and value, separated by whitespace\&. Blank lines and comment lines are ignored\&. Comments are introduced with a "#" pound sign and the pound sign must be the first non\-white character of the line\&. +.PP +Parameter values may be of four types: strings, booleans, numbers, and long numbers\&. A string is comprised of any printable characters\&. A boolean should be either the value +\fIyes\fR +or +\fIno\fR\&. An undefined boolean parameter or one with a value other than these will be given a +\fIno\fR +value\&. Numbers (both regular and long) may be either decimal values, octal values (precede the value with +\fI0\fR) or hexadecimal values (precede the value with +\fI0x\fR)\&. The maximum value of the regular and long numeric parameters is machine\-dependent\&. +.PP +提供如下配置项: +.PP +\fBCHFN_AUTH\fR (boolean) +.RS 4 +如果为 +\fIyes\fR,\fBchfn\fR +进行任何更改前都要要求认证,除非由超级用户运行。 +.RE +.PP +\fBCHFN_RESTRICT\fR (string) +.RS 4 +This parameter specifies which values in the +\fIgecos\fR +field of the +/etc/passwd +file may be changed by regular users using the +\fBchfn\fR +program\&. It can be any combination of letters +\fIf\fR, +\fIr\fR, +\fIw\fR, +\fIh\fR, for Full name, Room number, Work phone, and Home phone, respectively\&. For backward compatibility, +\fIyes\fR +is equivalent to +\fIrwh\fR +and +\fIno\fR +is equivalent to +\fIfrwh\fR\&. If not specified, only the superuser can make any changes\&. The most restrictive setting is better achieved by not installing +\fBchfn\fR +SUID\&. +.RE +.PP +\fBCHSH_AUTH\fR (boolean) +.RS 4 +如果 +\fIyes\fR,\fBchsh\fR +程序在做任何更改之前都会要求认证,除非是以超级用户身份运行的。 +.RE +.PP +\fBCONSOLE\fR (string) +.RS 4 +如果定义了,或者是包含设备名(没行一个)的文件的完整路径名,或者是\(lq:\(rq分隔的设备名列表。将只会在这写设备上允许 root 登录。 +.sp +如果没有定义,可以在任何设备上使用 root。 +.sp +指定的设备时不带 /dev/ 前缀。 +.RE +.PP +\fBCONSOLE_GROUPS\fR (string) +.RS 4 +在控制台登录时,添加到用户附加组集中的组列表(就如 CONSOLE 所确定的)。默认是无。 +使用时需要注意:这可能使用户获取这些组的永久权限,甚至登录到的不是此控制台时。 +.RE +.PP +\fBCREATE_HOME\fR (boolean) +.RS 4 +指示是否应该为新用户默认创建主目录。 +.sp +此设置并不应用到系统用户,并且可以使用命令行覆盖。 +.RE +.PP +\fBDEFAULT_HOME\fR (boolean) +.RS 4 +如果不能 cd 到主目录时,说明是否允许登录。默认是否。 +.sp +如果设置为 +\fIyes\fR,如果不能 cd 到主目录时,用户将会登录到根目录(/)。 +.RE +.PP +\fBENCRYPT_METHOD\fR (string) +.RS 4 +这定义了系统加密密码的默认算法(如果没有在命令行上指定算法)。 +.sp +可以使用如下值:\fIDES\fR +(default), +\fIMD5\fR, \fISHA256\fR, \fISHA512\fR\&. +.sp +注意,此参数会覆盖 +\fBMD5_CRYPT_ENAB\fR +变量。 +.RE +.PP +\fBENV_HZ\fR (string) +.RS 4 +如果设置了,将会用于在用户登录时定义 HZ 环境变量。值必须以 +\fIHZ=\fR +开头。Linux 上的常用值是 +\fIHZ=100\fR。 +.RE +.PP +\fBENV_PATH\fR (string) +.RS 4 +If set, it will be used to define the PATH environment variable when a regular user login\&. The value is a colon separated list of paths (for example +\fI/bin:/usr/bin\fR) and can be preceded by +\fIPATH=\fR\&. The default value is +\fIPATH=/bin:/usr/bin\fR\&. +.RE +.PP +\fBENV_SUPATH\fR (string) +.RS 4 +If set, it will be used to define the PATH environment variable when the superuser login\&. The value is a colon separated list of paths (for example +\fI/sbin:/bin:/usr/sbin:/usr/bin\fR) and can be preceded by +\fIPATH=\fR\&. The default value is +\fIPATH=/sbin:/bin:/usr/sbin:/usr/bin\fR\&. +.RE +.PP +\fBENV_TZ\fR (string) +.RS 4 +如果设置了,它将用于在用户登录时定义 TZ 环境变量。此值可以是以 +\fITZ=\fR +开头的时区名(例如 +\fITZ=CST6CDT\fR),或者是包含时区规则的文件完整路径(例如 +/etc/tzname)。 +.sp +如果将完整路径指定为了一个不存在或不可读的文件,则默认使用 +\fITZ=CST6CDT\fR。 +.RE +.PP +\fBENVIRON_FILE\fR (string) +.RS 4 +如果此文件存在,并且可读,将会从中读取登录环境。所有行都必须是 name=value 的格式。 +.sp +以 # 开头的行将视为注释,并被忽略。 +.RE +.PP +\fBERASECHAR\fR (number) +.RS 4 +终端擦除字符 (\fI010\fR += backspace, +\fI0177\fR += DEL)。 +.sp +此值可以使用前缀\(lq0\(rq表示八进制,\(lq0x\(rq表示十六进制。 +.RE +.PP +\fBFAIL_DELAY\fR (number) +.RS 4 +登录失败后,等待多少秒才再允许登录。 +.RE +.PP +\fBFAILLOG_ENAB\fR (boolean) +.RS 4 +允许登录并显示 +/var/log/faillog +登录失败信息。 +.RE +.PP +\fBFAKE_SHELL\fR (string) +.RS 4 +如果设置了,\fBlogin\fR +将执行此 shell 而不是在 +/etc/passwd +中指定的用户 shell。 +.RE +.PP +\fBFTMP_FILE\fR (string) +.RS 4 +如果定义,登录失败会以 utmp 格式记录在此文件中。 +.RE +.PP +\fBGID_MAX\fR (number), \fBGID_MIN\fR (number) +.RS 4 +\fBuseradd\fR,\fBgroupadd\fR +或 +\fBnewusers\fR +创建的常规组的组 ID 的范围。 +.sp +\fBGID_MIN\fR +和 +\fBGID_MAX\fR +的默认值分别是 1000 和 60000。 +.RE +.PP +\fBHUSHLOGIN_FILE\fR (string) +.RS 4 +If defined, this file can inhibit all the usual chatter during the login sequence\&. If a full pathname is specified, then hushed mode will be enabled if the user\*(Aqs name or shell are found in the file\&. If not a full pathname, then hushed mode will be enabled if the file exists in the user\*(Aqs home directory\&. +.RE +.PP +\fBISSUE_FILE\fR (string) +.RS 4 +如果定义了,此文件将在每次的登录提示之前现实。 +.RE +.PP +\fBKILLCHAR\fR (number) +.RS 4 +终端 KILL 字符 (\fI025\fR += CTRL/U)。 +.sp +此值可以使用前缀\(lq0\(rq表示八进制,\(lq0x\(rq表示十六进制。 +.RE +.PP +\fBLASTLOG_ENAB\fR (boolean) +.RS 4 +允许记录和显示 /var/log/lastlog 登录时间信息。 +.RE +.PP +\fBLOG_OK_LOGINS\fR (boolean) +.RS 4 +允许记录成功登录。 +.RE +.PP +\fBLOG_UNKFAIL_ENAB\fR (boolean) +.RS 4 +在记录到登录失败时,允许记录未知用户名。 +.sp +注意:如果用户不小心将密码输入到了登录名中,记录未知用户名可能是一个安全隐患。 +.RE +.PP +\fBLOGIN_RETRIES\fR (number) +.RS 4 +密码错误时,重试的最大次数。 +.RE +.PP +\fBLOGIN_STRING\fR (string) +.RS 4 +此字符串用于提示输入密码。默认是 "Password: ",或者翻译了的结果(汉语中翻译为了\(lq密码:\(rq)。如果设置了此变量,提示不会被翻译。 +.sp +如果字符串包含 +\fI%s\fR,将会被用户名替换。 +.RE +.PP +\fBLOGIN_TIMEOUT\fR (number) +.RS 4 +最大登录时间(以秒为单位)。 +.RE +.PP +\fBMAIL_CHECK_ENAB\fR (boolean) +.RS 4 +启用登录时检查和现实邮箱状态。 +.sp +如果 shell 的启动文件已经检查了邮件("mailx \-e" 或者其它同功能的工具),您应该禁用它。 +.RE +.PP +\fBMAIL_DIR\fR (string) +.RS 4 +邮箱目录。修改或删除用户账户时需要处理邮箱,如果没有指定,将使用编译时指定的默认值。 +.RE +.PP +\fBMAIL_FILE\fR (string) +.RS 4 +定义用户邮箱文件的位置(相对于主目录)。 +.RE +.PP +\fBMAIL_DIR\fR +and +\fBMAIL_FILE\fR +变量由 +\fBuseradd\fR,\fBusermod\fR +和 +\fBuserdel\fR +用于创建、移动或删除用户邮箱。 +.PP +如果 +\fBMAIL_CHECK_ENAB\fR +设置为 +\fIyes\fR,它们也被用于定义 +\fBMAIL\fR +环境变量。 +.PP +\fBMAX_MEMBERS_PER_GROUP\fR (number) +.RS 4 +每个组条目的最大成员数。达到最大值时,在 +/etc/group +开始一个新条目(行)(使用同样的名称,同样的密码,同样的 GID)。 +.sp +默认值是 0,意味着组中的成员数没有限制。 +.sp +此功能(分割组)允许限制组文件中的行长度。这对于确保 NIS 组的行比长于 1024 字符。 +.sp +如果要强制这个限制,可以使用 25。 +.sp +注意:分割组可能不受所有工具的支持(甚至在 Shadow 工具集中)。您不应该使用这个变量,除非真的需要。 +.RE +.PP +\fBMD5_CRYPT_ENAB\fR (boolean) +.RS 4 +表示密码是否必须使用基于 MD5 的算法加密。如果设为 +\fIyes\fR,新密码将使用可以和新版 FreeBSD 兼容的基于 MD5 的算法加密。它支持无限长度的密码以及更长的盐字符串。如果您需要将加密的密码复制到其它不理解新算法的系统,设置为 +\fIno\fR。默认值是 +\fIno\fR。 +.sp +This variable is superseded by the +\fBENCRYPT_METHOD\fR +variable or by any command line option used to configure the encryption algorithm\&. +.sp +此变量已经废弃。您应该使用 +\fBENCRYPT_METHOD\fR。 +.RE +.PP +\fBMOTD_FILE\fR (string) +.RS 4 +If defined, ":" delimited list of "message of the day" files to be displayed upon login\&. +.RE +.PP +\fBNOLOGINS_FILE\fR (string) +.RS 4 +If defined, name of file whose presence will inhibit non\-root logins\&. The contents of this file should be a message indicating why logins are inhibited\&. +.RE +.PP +\fBOBSCURE_CHECKS_ENAB\fR (boolean) +.RS 4 +对密码更改启用附加检查。 +.RE +.PP +\fBPASS_ALWAYS_WARN\fR (boolean) +.RS 4 +如果是 root,警告弱密码,但是仍然允许使用。 +.RE +.PP +\fBPASS_CHANGE_TRIES\fR (number) +.RS 4 +可以尝试更改密码的最大次数(太容易)。 +.RE +.PP +\fBPASS_MAX_DAYS\fR (number) +.RS 4 +一个密码可以使用的最大天数。如果密码比这旧,将会强迫更改密码。如果不指定,就假定为 \-1,这会禁用这个限制。 +.RE +.PP +\fBPASS_MIN_DAYS\fR (number) +.RS 4 +两次更改密码时间的最小间隔。将会拒绝任何早于此的更改密码的尝试。如果不指定,假定为 \-1,将会禁用这个限制。 +.RE +.PP +\fBPASS_WARN_AGE\fR (number) +.RS 4 +密码过期之前给出警告的天数。0 表示只有只在过期的当天警告,负值表示不警告。如果没有指定,不会给警告。 +.RE +.PP + +\fBPASS_MAX_DAYS\fR, +\fBPASS_MIN_DAYS\fR +and +\fBPASS_WARN_AGE\fR +are only used at the time of account creation\&. Any changes to these settings won\*(Aqt affect existing accounts\&. +.PP +\fBPASS_MAX_LEN\fR (number), \fBPASS_MIN_LEN\fR (number) +.RS 4 +crypt() 的有效字符位数。\fBPASS_MAX_LEN\fR +默认是 8,除非您自己的 crypt() 更好,否则不要更改。如果 +\fBMD5_CRYPT_ENAB\fR +设为 +\fIyes\fR,会被忽略。 +.RE +.PP +\fBPORTTIME_CHECKS_ENAB\fR (boolean) +.RS 4 +Enable checking of time restrictions specified in +/etc/porttime\&. +.RE +.PP +\fBQUOTAS_ENAB\fR (boolean) +.RS 4 +Enable setting of resource limits from +/etc/limits +and ulimit, umask, and niceness from the user\*(Aqs passwd gecos field\&. +.RE +.PP +\fBSHA_CRYPT_MIN_ROUNDS\fR (number), \fBSHA_CRYPT_MAX_ROUNDS\fR (number) +.RS 4 +\fBENCRYPT_METHOD\fR +设为 +\fISHA256\fR +或 +\fISHA512\fR +时,此项确定加密算法默认使用 SHA 轮转数目(当轮转数没有通过命令行指定时)。 +.sp +使用很多轮转,会让暴力破解更加困难。但是需要注意,认证用户时也会需要更多的 CPU 资源。 +.sp +如果没有指定,libc 会选择默认的轮转数(5000)。 +.sp +值必须在 1000 \- 999,999,999 之间。 +.sp +如果只设置了一个 +\fBSHA_CRYPT_MIN_ROUNDS\fR +或 +\fBSHA_CRYPT_MAX_ROUNDS\fR +值,就会使用这个值。 +.sp +如果 +\fBSHA_CRYPT_MIN_ROUNDS\fR +> +\fBSHA_CRYPT_MAX_ROUNDS\fR,将会使用大的那个。 +.RE +.PP +\fBSULOG_FILE\fR (string) +.RS 4 +如果定义了,所有的 su 活动都会记录到此文件。 +.RE +.PP +\fBSU_NAME\fR (string) +.RS 4 +如果定义了,就是运行\(lqsu \-\(rq时显示的命令名称。例如,如果定义为\(lqsu\(rq,那么\(lqps\(rq会显示此命令为\(lq\-su\(rq。如果没有定义,\(lqps\(rq将会显示实际执行的 shell,例如类似于\(lq\-sh\(rq。 +.RE +.PP +\fBSU_WHEEL_ONLY\fR (boolean) +.RS 4 +如果为 +\fIyes\fR,用户必须在 +/etc/group +中别设定为 GID 为 0 的组(在大部分 Linux 上叫 +\fIroot\fR)的成员。 +.RE +.PP +\fBSYS_GID_MAX\fR (number), \fBSYS_GID_MIN\fR (number) +.RS 4 +\fBuseradd\fR、\fBgroupadd\fR +或 +\fBnewusers\fR +创建的系统组的组 ID 的范围。 +.sp +\fBSYS_GID_MIN\fR +和 +\fBSYS_GID_MAX\fR +的默认值分别是 101 和 +\fBGID_MIN\fR\-1。 +.RE +.PP +\fBSYS_UID_MAX\fR (number), \fBSYS_UID_MIN\fR (number) +.RS 4 +\fBuseradd\fR +或 +\fBnewusers\fR +创建的系统用户的用户 ID 的范围。 +.sp +\fBSYS_UID_MIN\fR +和 +\fBSYS_UID_MAX\fR +的默认值分别是 101 和 +\fBUID_MIN\fR\-1。 +.RE +.PP +\fBSYSLOG_SG_ENAB\fR (boolean) +.RS 4 +允许\(lqsyslog\(rq记录 +\fBsg\fR +的活动。 +.RE +.PP +\fBSYSLOG_SU_ENAB\fR (boolean) +.RS 4 +除了 sulog 文件日志,也为 +\fBsu\fR +活动启用\(lqsyslog\(rq日志。 +.RE +.PP +\fBTTYGROUP\fR (string), \fBTTYPERM\fR (string) +.RS 4 +The terminal permissions: the login tty will be owned by the +\fBTTYGROUP\fR +group, and the permissions will be set to +\fBTTYPERM\fR\&. +.sp +By default, the ownership of the terminal is set to the user\*(Aqs primary group and the permissions are set to +\fI0600\fR\&. +.sp + +\fBTTYGROUP\fR +can be either the name of a group or a numeric group identifier\&. +.sp +If you have a +\fBwrite\fR +program which is "setgid" to a special group which owns the terminals, define TTYGROUP to the group number and TTYPERM to 0620\&. Otherwise leave TTYGROUP commented out and assign TTYPERM to either 622 or 600\&. +.RE +.PP +\fBTTYTYPE_FILE\fR (string) +.RS 4 +If defined, file which maps tty line to TERM environment parameter\&. Each line of the file is in a format something like "vt100 tty01"\&. +.RE +.PP +\fBUID_MAX\fR (number), \fBUID_MIN\fR (number) +.RS 4 +\fBuseradd\fR +或 +\fBnewusers\fR +创建的普通用户的用户 ID 的范围。 +.sp +\fBUID_MIN\fR +和 +\fBUID_MAX\fR +的默认值分别是 1000 和 60000。 +.RE +.PP +\fBULIMIT\fR (number) +.RS 4 +默认 +\fBulimit\fR +值。 +.RE +.PP +\fBUMASK\fR (number) +.RS 4 +文件模式创建掩码初始化为此值。如果没有指定,掩码初始化为 022。 +.sp +\fBuseradd\fR +和 +\fBnewusers\fR +使用此掩码设置它们创建的用户主目录的模式。 +.sp +也被 +\fBlogin\fR +用于指定用户的初始 umask。注意,此掩码可以被用户的 GECOS 行覆盖(当设置了 +\fBQUOTAS_ENAB\fR +时),也可以被带 +\fIK\fR +指示符的 +\fBlimits\fR(5) +定义的限制值覆盖。 +.RE +.PP +\fBUSERDEL_CMD\fR (string) +.RS 4 +如果定义了,这是删除账户时执行的命令。它应该移除所有属于此用户的的 at/cron/print 等作业(作为第一个参数传递)。 +.sp +这个脚本的返回值并不被带到账户中去。 +.sp +这是一个示例脚本,它移除用户的 cron、at 和 print 作业: +.sp +.if n \{\ +.RS 4 +.\} +.nf +#! /bin/sh + +# 检查需要的参数 +if [ $# != 1 ]; then + echo "Usage: $0 username" + exit 1 +fi + +# 移除 cron 作业 +crontab \-r \-u $1 + +# 移除 at 作业 +# 注意这将移除所有属于同一个 UID 的作业 +# 即使此 ID 由多个用户名共享 +AT_SPOOL_DIR=/var/spool/cron/atjobs +find $AT_SPOOL_DIR \-name "[^\&.]*" \-type f \-user $1 \-delete \e; + +# 移除 print 作业 +lprm $1 + +# 全部完成 +exit 0 + +.fi +.if n \{\ +.RE +.\} +.RE +.PP +\fBUSERGROUPS_ENAB\fR (boolean) +.RS 4 +如果 uid 和 gid 相同,用户名和主用户名也相同,使非 root 组的组掩码位和属主位相同 (如:022 \-> 002, 077 \-> 007)。 +.sp +如果设置为 +\fIyes\fR,如果组中没有成员了,\fBuserdel\fR +将移除此用户组,\fBuseradd\fR +创建用户时,也会创建一个同名的默认组。 +.RE +.SH "交叉引用" +.PP +如下交叉引用显示影子密码套件哪个程序使用哪个参数。 +.PP +chfn +.RS 4 +CHFN_AUTH +CHFN_RESTRICT +LOGIN_STRING +.RE +.PP +chgpasswd +.RS 4 +ENCRYPT_METHOD MAX_MEMBERS_PER_GROUP MD5_CRYPT_ENAB +SHA_CRYPT_MAX_ROUNDS SHA_CRYPT_MIN_ROUNDS +.RE +.PP +chpasswd +.RS 4 + +ENCRYPT_METHOD MD5_CRYPT_ENAB +SHA_CRYPT_MAX_ROUNDS SHA_CRYPT_MIN_ROUNDS +.RE +.PP +chsh +.RS 4 +CHSH_AUTH LOGIN_STRING +.RE +.PP +gpasswd +.RS 4 +ENCRYPT_METHOD MAX_MEMBERS_PER_GROUP MD5_CRYPT_ENAB +SHA_CRYPT_MAX_ROUNDS SHA_CRYPT_MIN_ROUNDS +.RE +.PP +groupadd +.RS 4 +GID_MAX GID_MIN MAX_MEMBERS_PER_GROUP SYS_GID_MAX SYS_GID_MIN +.RE +.PP +groupdel +.RS 4 +MAX_MEMBERS_PER_GROUP +.RE +.PP +groupmems +.RS 4 +MAX_MEMBERS_PER_GROUP +.RE +.PP +groupmod +.RS 4 +MAX_MEMBERS_PER_GROUP +.RE +.PP +grpck +.RS 4 +MAX_MEMBERS_PER_GROUP +.RE +.PP +grpconv +.RS 4 +MAX_MEMBERS_PER_GROUP +.RE +.PP +grpunconv +.RS 4 +MAX_MEMBERS_PER_GROUP +.RE +.PP +login +.RS 4 +CONSOLE +CONSOLE_GROUPS DEFAULT_HOME +ENV_HZ ENV_PATH ENV_SUPATH ENV_TZ ENVIRON_FILE +ERASECHAR FAIL_DELAY +FAILLOG_ENAB +FAKE_SHELL +FTMP_FILE +HUSHLOGIN_FILE +ISSUE_FILE +KILLCHAR +LASTLOG_ENAB +LOGIN_RETRIES +LOGIN_STRING +LOGIN_TIMEOUT LOG_OK_LOGINS LOG_UNKFAIL_ENAB +MAIL_CHECK_ENAB MAIL_DIR MAIL_FILE MOTD_FILE NOLOGINS_FILE PORTTIME_CHECKS_ENAB QUOTAS_ENAB +TTYGROUP TTYPERM TTYTYPE_FILE +ULIMIT UMASK +USERGROUPS_ENAB +.RE +.PP +newgrp / sg +.RS 4 +SYSLOG_SG_ENAB +.RE +.PP +newusers +.RS 4 +ENCRYPT_METHOD GID_MAX GID_MIN MAX_MEMBERS_PER_GROUP MD5_CRYPT_ENAB PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE +SHA_CRYPT_MAX_ROUNDS SHA_CRYPT_MIN_ROUNDS +SYS_GID_MAX SYS_GID_MIN SYS_UID_MAX SYS_UID_MIN UID_MAX UID_MIN UMASK +.RE +.PP +passwd +.RS 4 +ENCRYPT_METHOD MD5_CRYPT_ENAB OBSCURE_CHECKS_ENAB PASS_ALWAYS_WARN PASS_CHANGE_TRIES PASS_MAX_LEN PASS_MIN_LEN +SHA_CRYPT_MAX_ROUNDS SHA_CRYPT_MIN_ROUNDS +.RE +.PP +pwck +.RS 4 +PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE +.RE +.PP +pwconv +.RS 4 +PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE +.RE +.PP +su +.RS 4 +CONSOLE +CONSOLE_GROUPS DEFAULT_HOME +ENV_HZ ENVIRON_FILE +ENV_PATH ENV_SUPATH +ENV_TZ LOGIN_STRING MAIL_CHECK_ENAB MAIL_DIR MAIL_FILE QUOTAS_ENAB +SULOG_FILE SU_NAME +SU_WHEEL_ONLY +SYSLOG_SU_ENAB +USERGROUPS_ENAB +.RE +.PP +sulogin +.RS 4 +ENV_HZ +ENV_TZ +.RE +.PP +useradd +.RS 4 +CREATE_HOME GID_MAX GID_MIN MAIL_DIR MAX_MEMBERS_PER_GROUP PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE SYS_GID_MAX SYS_GID_MIN SYS_UID_MAX SYS_UID_MIN UID_MAX UID_MIN UMASK +.RE +.PP +userdel +.RS 4 +MAIL_DIR MAIL_FILE MAX_MEMBERS_PER_GROUP USERDEL_CMD USERGROUPS_ENAB +.RE +.PP +usermod +.RS 4 +MAIL_DIR MAIL_FILE MAX_MEMBERS_PER_GROUP +.RE +.SH "参见" +.PP +\fBlogin\fR(1), +\fBpasswd\fR(1), +\fBsu\fR(1), +\fBpasswd\fR(5), +\fBshadow\fR(5), +\fBpam\fR(8)\&. diff --git a/man/zh_CN/man5/passwd.5 b/man/zh_CN/man5/passwd.5 new file mode 100644 index 0000000..bdf95cc --- /dev/null +++ b/man/zh_CN/man5/passwd.5 @@ -0,0 +1,178 @@ +'\" t +.\" Title: passwd +.\" Author: Julianne Frances Haugh +.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> +.\" Date: 2012-05-25 +.\" Manual: 文件格式和转化 +.\" Source: shadow-utils 4.1.5.1 +.\" Language: Chinese Simplified +.\" +.TH "PASSWD" "5" "2012-05-25" "shadow\-utils 4\&.1\&.5\&.1" "文件格式和转化" +.\" ----------------------------------------------------------------- +.\" * 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 "名称" +passwd \- 密码文件 +.SH "描述" +.PP +/etc/passwd +为每个用户账户包含一行,包含使用冒号 (\(lq:\(rq) 分隔的七个字段,分别是: +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +登录名 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +可选的加密后的密码 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +数字用户 ID +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +数字组 ID +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +用户名和注释字段 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +用户主目录 +.RE +.sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +可选的用户命令解释器 +.RE +.PP +加密的密码字段可以为空,此时使用指定的登录名登录时不会要求认证。然而,如果 +\fIpassword\fR +为空,一些读取 +/etc/passwd +文件的程序可能会不允许 +\fI任何\fR +访问。如果 +\fIpassword\fR +字段是一个小写的 +\(lqx\(rq,那么加密的密码实际上存储于 +\fBshadow\fR(5) +中;在 +/etc/shadow +文件中 +\fI必须\fR +有对应的行,否则用户账户就会无效。如果 +\fIpassword\fR +字段是其他任何字符串,将会被视为加密过的密码,如 +\fBcrypt\fR(3) +中的说明。 +.PP +此注释字段被多个系统工具使用,例如 +\fBfinger\fR(1)。 +.PP +主目录字段提供了初始工作目录的名称。\fBlogin\fR +程序根据此信息设置 +\fB$HOME\fR +环境变量。 +.PP +命令解释器字段提供了用户命令语言解释器的名称,或者开始时执行的程序的名称。\fBlogin\fR +程序使用此信息设置 +\fB$SHELL\fR +环境变量的值。如果字段为空,默认值为 +/bin/sh。 +.SH "文件" +.PP +/etc/passwd +.RS 4 +用户账户信息。 +.RE +.PP +/etc/shadow +.RS 4 +可选的加密后的密码文件 +.RE +.PP +/etc/passwd\- +.RS 4 +/etc/passwd 的备份文件。 +.sp +注意,此文件由 shadow 工具集使用,而不是所有的用户和密码管理工具都会使用。 +.RE +.SH "参见" +.PP +\fBcrypt\fR(3), +\fBgetent\fR(1), +\fBgetpwnam\fR(3), +\fBlogin\fR(1), +\fBpasswd\fR(1), +\fBpwck\fR(8), +\fBpwconv\fR(8), +\fBpwunconv\fR(8), +\fBshadow\fR(5), +\fBsu\fR(1), +\fBsulogin\fR(8)\&. diff --git a/man/zh_CN/man5/porttime.5 b/man/zh_CN/man5/porttime.5 new file mode 100644 index 0000000..6e62c4d --- /dev/null +++ b/man/zh_CN/man5/porttime.5 @@ -0,0 +1,93 @@ +'\" t +.\" Title: porttime +.\" Author: Julianne Frances Haugh +.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> +.\" Date: 2012-05-25 +.\" Manual: 文件格式和转化 +.\" Source: shadow-utils 4.1.5.1 +.\" Language: Chinese Simplified +.\" +.TH "PORTTIME" "5" "2012-05-25" "shadow\-utils 4\&.1\&.5\&.1" "文件格式和转化" +.\" ----------------------------------------------------------------- +.\" * 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 "名称" +porttime \- 端口访问时间文件 +.SH "描述" +.PP +\fIporttime\fR +包含一个 tty 设备、用户名和允许登录时间的列表。 +.PP +每项包含三个由冒号分隔的字段。第一个字段是逗号分隔的 tty 设备列表,或者星号表示匹配所有终端。第二个字段是逗号分隔的用户名列表,或者星号表示匹配所有用户名。第三个字段是逗号分隔的访问许可时间。 +.PP +每条访问时间包含一周的 0 天或多天,缩写为 +\fISu\fR, +\fIMo\fR, +\fITu\fR, +\fIWe\fR, +\fITh\fR, +\fIFr\fR +和 +\fISa\fR,随后是连字符分隔的一组时间,缩写 +\fIWk\fR +可以用于表示周一到周五,\fIAl\fR +可以用于表示没一天。如果没有制定周几,将会假定为 +\fIAl\fR。 +.SH "示例" +.PP +下面的条目允许在工作日的上午九点到下午五点在任何端口上访问用户 +\fBjfh\fR。 +.PP +*:jfh:Wk0900\-1700 +.PP +下面这条任何时间,只允许用户 +\fIroot\fR +和 +\fIoper\fR +在 +/dev/console +登录。这也是说 +/etc/porttime +文件是一个访问时间的有序列表。任何匹配第二条的其他用户都不会被允许访问。 +.sp +.if n \{\ +.RS 4 +.\} +.nf + console:root,oper:Al0000\-2400 + console:*: + +.fi +.if n \{\ +.RE +.\} +.PP +如下项允许,在非工作时间在任何端口上使用用户 +\fIgames\fR。 +.PP +*:games:Wk1700\-0900,SaSu0000\-2400 +.SH "文件" +.PP +/etc/porttime +.RS 4 +包含了端口访问信息的文件。 +.RE +.SH "参见" +.PP +\fBlogin\fR(1)\&. diff --git a/man/zh_CN/man5/shadow.5 b/man/zh_CN/man5/shadow.5 new file mode 100644 index 0000000..736749c --- /dev/null +++ b/man/zh_CN/man5/shadow.5 @@ -0,0 +1,149 @@ +'\" t +.\" Title: shadow +.\" Author: Julianne Frances Haugh +.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> +.\" Date: 2012-05-25 +.\" Manual: 文件格式和转化 +.\" Source: shadow-utils 4.1.5.1 +.\" Language: Chinese Simplified +.\" +.TH "SHADOW" "5" "2012-05-25" "shadow\-utils 4\&.1\&.5\&.1" "文件格式和转化" +.\" ----------------------------------------------------------------- +.\" * 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 +是一个文件,它包含系统账户的密码信息和可选的年龄信息。 +.PP +如果没有维护好密码安全,此文件绝对不能让普通用户可读。 +.PP +此文件的每行包括 9 个字段,使用半角冒号 (\(lq:\(rq) 分隔,顺序如下: +.PP +\fB登录名\fR +.RS 4 +必须是有效的账户名,且已经存在于系统中。 +.RE +.PP +\fB加密了的密码\fR +.RS 4 +请参考 +\fBcrypt\fR(3) +来了解关于解析此字符串的细节信息。 +.sp +如果密码字段包含一些不是 +\fBcrypt\fR(3) +合法结果的字符,比如 ! 或 *,用户将无法使用 unix 密码登录(但是可以通过其它方法登录系统)。 +.sp +此字段可以为空,此时认证为特定的登录名时,不要求密码。然而,一些读取 +/etc/shadow +文件的应用程序,在密码字段为空时,可能决定禁止任何访问。 +.sp +以叹号开始的密码字段意味着密码被锁定。该行的剩余字符表示锁定之前的密码。 +.RE +.PP +\fB最后一次更改密码的日期\fR +.RS 4 +最近一次更改密码的时间,表示从1970年1月1日开始的天数。 +.sp +0 有特殊意思,表示用户应该在下次登录系统时更改密码。 +.sp +空字段表示密码年龄功能被禁用。 +.RE +.PP +\fB密码的最小年龄\fR +.RS 4 +最小密码年龄是指,用户一次更改密码之后,要等多长时间才再次被允许更改密码。 +.sp +空字段或 0 表示没有最小密码年龄。 +.RE +.PP +\fB最大密码年龄\fR +.RS 4 +最大密码年龄是指,这写天之后,用户必须更改密码。 +.sp +这写天之后,密码仍然可用。用户将会在下次登录的时候被要求更改密码。 +.sp +空字段表示没有最大密码年龄,没有密码警告时间段,没有密码禁用时间段(请看下边)。 +.sp +如果最大密码年龄小于最小密码年龄,用户将会不能更改密码。 +.RE +.PP +\fB密码警告时间段\fR +.RS 4 +密码过期之前,提前警告用户的的天数(请参考上边的密码的最大年龄)。 +.sp +空字段或者 0 表示没有密码警告期。 +.RE +.PP +\fB密码禁用期\fR +.RS 4 +密码过期(查看上边的密码最大年龄)后,仍然接受此密码的天数(在此期间,用户应该在下次登录时修改密码)。 +.sp +密码到期并且过了这个宽限期之后,使用用户的当前的密码将会不能登录。用户需要联系系统管理员。 +.sp +空字段表示没有强制密码过期。 +.RE +.PP +\fB账户过期日期\fR +.RS 4 +账户过期的日期,表示从1970年1月1日开始的天数。 +.sp +注意,账户过期不同于密码过期。账户过期时,用户将不被允许登录;密码过期时,用户将不被允许使用其密码登录。 +.sp +空字段表示账户永不过期。 +.sp +应该避免使用 0,因为它既能理解成永不过期也能理解成在1970年1月1日过期。 +.RE +.PP +\fB保留字段\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)\&. diff --git a/man/zh_CN/man5/suauth.5 b/man/zh_CN/man5/suauth.5 new file mode 100644 index 0000000..a8eb058 --- /dev/null +++ b/man/zh_CN/man5/suauth.5 @@ -0,0 +1,138 @@ +'\" t +.\" Title: suauth +.\" Author: Marek Micha\(/lkiewicz +.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/> +.\" Date: 2012-05-25 +.\" Manual: 文件格式和转化 +.\" Source: shadow-utils 4.1.5.1 +.\" Language: Chinese Simplified +.\" +.TH "SUAUTH" "5" "2012-05-25" "shadow\-utils 4\&.1\&.5\&.1" "文件格式和转化" +.\" ----------------------------------------------------------------- +.\" * 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 "名称" +suauth \- 详细的 su 控制文件 +.SH "大纲" +.HP \w'\fB/etc/suauth\fR\ 'u +\fB/etc/suauth\fR +.SH "描述" +.PP +执行 su 命令时,总是根据 +/etc/suauth,可以更改 su 命令的行为,规则是: +.sp +.if n \{\ +.RS 4 +.\} +.nf + 1) su 到的用户 + +.fi +.if n \{\ +.RE +.\} +.PP +2) 执行 su 命令的用户 (或者他可能属于的组) +.PP +文件格式为:以 # 开头的行视为注视,并被忽略; +.sp +.if n \{\ +.RS 4 +.\} +.nf + to\-id:from\-id:ACTION + +.fi +.if n \{\ +.RE +.\} +.PP +此处的 to\-id 可以是:\fIALL\fR,逗号(,) 分隔的用户名列表或者 +\fIALL EXCEPT\fR +后跟逗号分隔的用户名列表。 +.PP +from\-id 格式和 to\-id 相同,但是可以多识别一个词 +\fIGROUP\fR。\fIALL EXCEPT GROUP\fR +也是有效的。\fIGROUP\fR +后边是一个或更多的组名称,使用逗号(,)分隔。不光要有相关主组的 ID,也需要在 +\fB/etc/group\fR(5) +中有一个条目。 +.PP +动作只可以使用如下当前支持的选项。 +.PP +\fIDENY\fR +.RS 4 +su 的尝试在询问密码之前就被拒绝。 +.RE +.PP +\fINOPASS\fR +.RS 4 +su 尝试自动成功,而且不询问密码。 +.RE +.PP +\fIOWNPASS\fR +.RS 4 +为了成功执行 su,用户必须提供自己的密码。将会提示他们这样。 +.RE +.PP +注意,有三个用冒号分割的字段。冒号旁边不能有空格。也请注意,这个文件会被一行一行地依次检查,会使用第一个可用的规则,而不会继续检查文件。这可以让系统管理员使系统尽量符合其期望。 +.SH "示例" +.sp +.if n \{\ +.RS 4 +.\} +.nf + # 示例 /etc/suauth 文件 + # + # 有两个用户可以使用自己的密码 su 成 root + # + root:chris,birddog:OWNPASS + # + # 任何其他人都不能 su 成 root,除非在 wheel 组中。 + # BSD 就是这样实现这个功能的。 + # + root:ALL EXCEPT GROUP wheel:DENY + # + # 或许 terry 和 birddog 是属于同一个人的账户 + # 两个账户直接互相 su,不需要密码 + # + terry:birddog:NOPASS + birddog:terry:NOPASS + # + +.fi +.if n \{\ +.RE +.\} +.SH "文件" +.PP +/etc/suauth +.RS 4 +.RE +.SH "缺陷" +.PP +可能会有很多潜在问题。文件解析器尤其不能容忍语法错误,不能有无意义的空白符(除了行首和行尾),并且使用特定的标记分割不同的事情。 +.SH "DIAGNOSTICS" +.PP +此文件的解析错误会使用 +\fBsyslogd\fR(8) +作为 AUTH 中的 ERR 级别报告。 +.SH "参见" +.PP +\fBsu\fR(1)\&. |