shadow/man/zh_CN/usermod.8

130 lines
5.2 KiB
Groff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

.\" $Id$
.\" Copyright 1991 \- 1994, Julianne Frances Haugh
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. Neither the name of Julianne F. Haugh nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY JULIE HAUGH AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL JULIE HAUGH OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.TH USERMOD 8
.SH 名称
usermod \- 修 改 使 用 者 帐 号
.SH 语法
.TP 8
.B usermod
.\" .RB [ \-A
.\" .RI { method | \fBDEFAULT\fR "},... ]"
.RB [ \-c
.IR comment ]
.RB [ \-d
.IR home_dir " ["
.BR \-m ]]
.br
.RB [ \-e
.IR expire_date ]
.RB [ \-f
.IR inactive_time ]
.br
.RB [ \-g
.IR initial_group ]
.RB [ \-G
.IR group [,...]]
.br
.RB [ \-l
.IR login_name ]
.RB [ \-s
.IR shell ]
.br
.RB [ \-u
.IR uid " ["
.BR \-o ]]
.I login
.SH 描述
\fBusermod\fR 命 令 会 参 照 你 命 令 列 上 指 定 的 部 份 修 改 系 统 帐
号 档 。 下 列 为 \fBusermod\fR 可 选 用 的 参 数 。
.\" .IP "\fB\-A \fImethod\fR|\fBDEFAULT\fR"
.\" The new value of the user's authentication method.
.\" The authentication method is the name of a program which is responsible
.\" for validating the user's identity.
.\" The string \fBDEFAULT\fR may be used to change the user's authentication
.\" method to the standard system password method.
.IP "\fB\-c\fR \fIcomment\fR"
更 新 使 用 者 帐 号 password 档 中 的 注 解 栏
一 般 是 使 用 \fBchfn\fR(1) 来 修 改 。
.IP "\fB\-d\fR \fIhome_dir\fR"
更 新 使 用 者 新 的 登 入 目 录 。
如 果 给 定 \fB\-m\fR 选 项 使 用 者 旧 目 录 会 搬 到 新 的 目 录 去
,如 旧 目 录 不 存 在 则 建 个 新 的 。
.IP "\fB\-e\fR \fIexpire_date\fR"
加 上 使 用 者 帐 号 停 止 日 期 。 日 期 格 式 为 \fIMM/DD/YY\fR.
.IP "\fB\-f\fR \fIinactive_days\fR"
帐 号 过 期 几 日 后 永 久 停 权。当 值 为 0 时
帐 号 则 立 刻 被 停 权 。 而 当 值 为 \-1 时 则 关闭此功能
。预 设 值 为 \-1。
.IP "\fB\-g\fR \fIinitial_group\fR"
更 新 使 用 者 新 的 起 始 登 入 群 组 。 群 组 名 须 已 存 在
。群 组 ID 必 须 参 照 既 有 的 的 群 组 。 群 组 ID 预 设 值 为 1 。
.IP "\fB\-G\fR \fIgroup,[...]\fR"
定 义 使 用 者 为 一 堆 groups 的 成 员 。 每
个 群 组 使 用 "," 区 格 开 来 不 可 以 夹 杂 空
白 字 元 。 群 组 名 同 \-g 选 项 的 限 制 。
如 果 使 用 者 现 在 的 群 组 不 再 此 列 则 将 使 用 者 由 该
群 组 中 移 除 。
.IP "\fB\-l\fR \fIlogin_name\fR"
变 更 使 用 者 \fIlogin\fR 时 的 名 称 为 \fIlogin_name\fR
其 于 不 变 。 特 别 是 使 用 者 目 录 名 应 该 也 会 跟 着 更 动 成 新
的 登 入 名 。
.IP "\fB\-s\fR \fIshell\fR"
指 定 新 登 入 shell 。 如 此 栏 留 白 系 统 将 选 用 系 统 预 设 shell 。
.IP "\fB\-u\fR \fIuid\fR"
使 用 者 ID 值 。必 须 为 唯 一 的 ID 值 除 非 用 \fI\-o\fR 选 项 。 数
字 不 可 为 负 值。预 设 为 最 小 不 得 小 于 999 而 逐 次
增 加 。 0~ 999 传 统 上 是 保 留 给 系 统 帐 号 使 用 。
使 用 者 目 录 树 下 所 有 的 档 案 目 录 其 user ID 会 自 动 改 变 。
放 在 使 用 者 目 录 外 的 档 案 则 要 自 行 手 动 更 动 。
.SH 警告
\fBusermod\fR 不 允 许 你 改 变 正 在线 上 的 使 用 者 帐 号 名 称 。
当 usermod 用 来 改 变 user ID, 必 须 确 认 这 名 user 没 在 电 脑 上 执
行 任 何 程 序。
你 需 手 动 更 改 使 用 者 的 crontab 档 。
也 需 手 动 更 改 使 用 者 的 at 工 作 档 。
采 用 NIS server 须 在 server 上 更 动 相 关 的 NIS 设 定 。
.SH 档案
\fI/etc/passwd\fR \- 使 用 者 帐 号 资 讯
.br
\fI/etc/shadow\fR \- 使 用 者 帐 号 资 讯 加 密
.br
\fI/etc/group\fR \- 群 组 资 讯
.SH 相关文件
.BR chfn (1),
.BR chsh (1),
.BR groupadd (8),
.BR groupdel (8),
.BR groupmod (8),
.BR passwd (1),
.BR useradd (8),
.BR userdel (8)
.SH 作者
Julianne Frances Haugh (jfh@tab.com)