diff options
Diffstat (limited to 'man/zh_CN/man8/usermod.8')
-rw-r--r-- | man/zh_CN/man8/usermod.8 | 175 |
1 files changed, 91 insertions, 84 deletions
diff --git a/man/zh_CN/man8/usermod.8 b/man/zh_CN/man8/usermod.8 index a4c55f92..4a61eb25 100644 --- a/man/zh_CN/man8/usermod.8 +++ b/man/zh_CN/man8/usermod.8 @@ -2,12 +2,12 @@ .\" Title: usermod .\" Author: Julianne Frances Haugh .\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> -.\" Date: 2019-06-13 +.\" Date: 2019-12-01 .\" Manual: 系统管理命令 -.\" Source: shadow-utils 4.7 +.\" Source: shadow-utils 4.8 .\" Language: Chinese Simplified .\" -.TH "USERMOD" "8" "2019-06-13" "shadow\-utils 4\&.7" "系统管理命令" +.TH "USERMOD" "8" "2019-12-01" "shadow\-utils 4\&.8" "系统管理命令" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -34,51 +34,62 @@ usermod \- 修改一个用户账户 \fBusermod\fR [\fI选项\fR] \fI登录\fR .SH "描述" .PP +The \fBusermod\fR -修改系统账户文件和在命令行上指定的相关更改。 +command modifies the system account files to reflect the changes that are specified on the command line\&. .SH "选项" .PP +The options which apply to the \fBusermod\fR -可以接受的选项有: +command are: .PP \fB\-a\fR, \fB\-\-append\fR .RS 4 -将用户添加到附加组。只能和 +Add the user to the supplementary group(s)\&. Use only with the \fB\-G\fR -选项一起使用。 +option\&. +.RE +.PP +\fB\-b\fR, \fB\-\-badnames\fR +.RS 4 +Allow names that do not conform to standards\&. +.RE +.PP +\fB\-b\fR, \fB\-\-badnames\fR +.RS 4 +Allow names that do not conform to standards\&. .RE .PP \fB\-c\fR, \fB\-\-comment\fR\ \&\fICOMMENT\fR .RS 4 -用户密码文件中注释字段的新值。通常使用 +The new value of the user\*(Aqs password file comment field\&. It is normally modified using the \fBchfn\fR(1) -工具对其进行修改。 +utility\&. .RE .PP \fB\-d\fR, \fB\-\-home\fR\ \&\fIHOME_DIR\fR .RS 4 用户的新登录目录。 .sp -如果给了 +If the \fB\-m\fR -选项,当前主目录的内容将会移动到新主目录中,如果不存在,则创建。 +option is given, the contents of the current home directory will be moved to the new home directory, which is created if it does not already exist\&. .RE .PP \fB\-e\fR, \fB\-\-expiredate\fR\ \&\fIEXPIRE_DATE\fR .RS 4 -用户账户将被禁用的日期。日期以 -\fIYYYY\-MM\-DD\fR -格式指定。 +The date on which the user account will be disabled\&. The date is specified in the format +\fIYYYY\-MM\-DD\fR\&. .sp -空 +An empty \fIEXPIRE_DATE\fR -参数将禁用账户过期。 +argument will disable the expiration of the account\&. .sp -此选项需要一个 -/etc/passwd -文件。如果没有,将会创建一条 +This option requires a /etc/shadow -项目。 +file\&. A +/etc/shadow +entry will be created if there were none\&. .RE .PP \fB\-f\fR, \fB\-\-inactive\fR\ \&\fIINACTIVE\fR @@ -87,11 +98,11 @@ usermod \- 修改一个用户账户 .sp 0 表示密码过期时,立即禁用账户;\-1 表示不使用这个功能。 .sp -此选项需要一个 -/etc/passwd -文件。如果没有,将会创建一条 +This option requires a /etc/shadow -项目。 +file\&. A +/etc/shadow +entry will be created if there were none\&. .RE .PP \fB\-g\fR, \fB\-\-gid\fR\ \&\fIGROUP\fR @@ -105,64 +116,63 @@ usermod \- 修改一个用户账户 .PP \fB\-G\fR, \fB\-\-groups\fR\ \&\fIGROUP1\fR[\fI,GROUP2,\&.\&.\&.\fR[\fI,GROUPN\fR]]] .RS 4 -用户还属于的附加组列表。组之间使用逗号分隔,没有空格。这些组需要遵守和 +A list of supplementary groups which the user is also a member of\&. Each group is separated from the next by a comma, with no intervening whitespace\&. The groups are subject to the same restrictions as the group given with the \fB\-g\fR -选项中给的组同样的限制。 +option\&. .sp -如果用户当前是一个组的成员,而这个组没有列在这里,用户将被从那个组里便删除。这个行为可以通过 +If the user is currently a member of a group which is not listed, the user will be removed from the group\&. This behaviour can be changed via the \fB\-a\fR -选项修改,这使用户追加到给出的附加组列表中。 +option, which appends the user to the current supplementary group list\&. .RE .PP \fB\-l\fR, \fB\-\-login\fR\ \&\fINEW_LOGIN\fR .RS 4 -用户的名称将会从 +The name of the user will be changed from \fILOGIN\fR -修改为 -\fINEW_LOGIN\fR。不会更改别的任何东西。特别是,用户的主目录名和邮件池也需要手动修改以和新登录名对应。 +to +\fINEW_LOGIN\fR\&. Nothing else is changed\&. In particular, the user\*(Aqs home directory or mail spool should probably be renamed manually to reflect the new login name\&. .RE .PP \fB\-L\fR, \fB\-\-lock\fR .RS 4 -锁定用户的密码。这会在用户加密的密码之前放置一个\(lq!\(rq,可以快速禁用密码。您可以和 +Lock a user\*(Aqs password\&. This puts a \*(Aq!\*(Aq in front of the encrypted password, effectively disabling the password\&. You can\*(Aqt use this option with \fB\-p\fR -或 -\fB\-U\fR -配合使用此选项。 +or +\fB\-U\fR\&. .sp -注意:如果希望锁定账户(不仅仅是通过密码访问),您也需要设置 +Note: if you wish to lock the account (not only access with a password), you should also set the \fIEXPIRE_DATE\fR -为 -\fI1\fR。 +to +\fI1\fR\&. .RE .PP \fB\-m\fR, \fB\-\-move\-home\fR .RS 4 将用户的主目录移动到新位置。 .sp -这个选项只有和 +This option is only valid in combination with the \fB\-d\fR -(或 -\fB\-\-home\fR) 选项组合使用时才有效。 +(or +\fB\-\-home\fR) option\&. .sp \fBusermod\fR -会改写文件的属主并复制模式、ACL 和扩展属性,但是稍后也可能需要手动修改。 +will try to adapt the ownership of the files and to copy the modes, ACL and extended attributes, but manual changes might be needed afterwards\&. .RE .PP \fB\-o\fR, \fB\-\-non\-unique\fR .RS 4 -使用 +When used with the \fB\-u\fR -选项时,可以将用户 ID 改为非唯一的值。 +option, this option allows to change the user ID to a non\-unique value\&. .RE .PP \fB\-p\fR, \fB\-\-password\fR\ \&\fIPASSWORD\fR .RS 4 -已经加密过的密码,就像 -\fBcrypt\fR(3) -返回的那样。 +The encrypted password, as returned by +\fBcrypt\fR(3)\&. .sp -\fB注意:\fR不推荐使用这个选项,因为密码(或加密过的密码)会被用户通过列出这个过程而看到。 +\fBNote:\fR +This option is not recommended because the password (or encrypted password) will be visible by users listing the processes\&. .sp 您应该确保密码符合系统的密码政策。 .RE @@ -194,41 +204,37 @@ directory\&. This option does not chroot and is intended for preparing a cross\- .RS 4 用户 ID 的新数值。 .sp -这个值必须是唯一的,除非使用了 +This value must be unique, unless the \fB\-o\fR -选项,必须是非负值。 +option is used\&. The value must be non\-negative\&. .sp 用户的邮箱,用户主目录中属于此用户的文件的属主 ID 也将自动更改。 .sp 用户主目录之外文件所有权必须手动修复。 .sp -不会对 -/etc/login\&.defs -中的 +No checks will be performed with regard to the \fBUID_MIN\fR, \fBUID_MAX\fR, -\fBSYS_UID_MIN\fR -和 +\fBSYS_UID_MIN\fR, or \fBSYS_UID_MAX\fR -进行检查。 +from +/etc/login\&.defs\&. .RE .PP \fB\-U\fR, \fB\-\-unlock\fR .RS 4 -解锁用户的密码。这将移除加密的密码之前的\(lq!\(rq。您可以将此选项和 +Unlock a user\*(Aqs password\&. This removes the \*(Aq!\*(Aq in front of the encrypted password\&. You can\*(Aqt use this option with \fB\-p\fR -或 -\fB\-L\fR -配合使用。 +or +\fB\-L\fR\&. .sp -注意:如果您希望解锁账户(不只是使用密码访问),您也应该设置 +Note: if you wish to unlock the account (not only access with a password), you should also set the \fIEXPIRE_DATE\fR -(例如设置为 -\fI99999\fR,或者 -/etc/default/useradd -中的 +(for example to +\fI99999\fR, or to the \fBEXPIRE\fR -值)。 +value from +/etc/default/useradd)\&. .RE .PP \fB\-v\fR, \fB\-\-add\-subuids\fR\ \&\fIFIRST\fR\-\fILAST\fR @@ -295,11 +301,11 @@ from /etc/login\&.defs\&. .RS 4 用户登陆的 SELinux 用户。 .sp -空的 +A blank \fISEUSER\fR -将移除用户 +will remove the SELinux user mapping for user \fILOGIN\fR -的 SELinux 用户映射(如果有)。 +(if any)\&. .RE .SH "CAVEATS" .PP @@ -307,18 +313,18 @@ You must make certain that the named user is not executing any processes when th \fBusermod\fR checks this on Linux\&. On other platforms it only uses utmp to check if the user is logged in\&. .PP -您必须手动更改 +You must change the owner of any \fBcrontab\fR -文件或 +files or \fBat\fR -作业的属主。 +jobs manually\&. .PP 您必须更改 NIS 服务器上的 NIS 相关内容。 .SH "配置文件" .PP -在 +The following configuration variables in /etc/login\&.defs -中有如下配置变量,可以用来更改此工具的行为: +change the behavior of this tool: .PP \fBLASTLOG_UID_MAX\fR (number) .RS 4 @@ -339,27 +345,28 @@ option present in the configuration means that there is no user ID limit for wri 定义用户邮箱文件的位置(相对于主目录)。 .RE .PP +The \fBMAIL_DIR\fR and \fBMAIL_FILE\fR -变量由 -\fBuseradd\fR,\fBusermod\fR -和 +variables are used by +\fBuseradd\fR, +\fBusermod\fR, and \fBuserdel\fR -用于创建、移动或删除用户邮箱。 +to create, move, or delete the user\*(Aqs mail spool\&. .PP -如果 +If \fBMAIL_CHECK_ENAB\fR -设置为 -\fIyes\fR,它们也被用于定义 +is set to +\fIyes\fR, they are also used to define the \fBMAIL\fR -环境变量。 +environment variable\&. .PP \fBMAX_MEMBERS_PER_GROUP\fR (number) .RS 4 -每个组条目的最大成员数。达到最大值时,在 +Maximum members per group entry\&. When the maximum is reached, a new group entry (line) is started in /etc/group -开始一个新条目(行)(使用同样的名称,同样的密码,同样的 GID)。 +(with the same name, same password, and same GID)\&. .sp 默认值是 0,意味着组中的成员数没有限制。 .sp |