NAME
chpasswd - 成批更新用户的口令
总览
chpasswd [-e]
描述
chpasswd 从系统的标准输入读入用户的名称和口令,并利用这些信息来更新系统上已存在的用户的口令。在没有用 -e 这个开关选项的情况下,口令将按明文的形式接收。如果使用了 -e 选项,口令将只能以加密的方式传递。每行的具体格式如下所示:
用户名:新口令
用户名必须是系统上已存在的用户。输入的密码在必要时进行加密处理,如果口令文件具有时间特性,则同时更新。
此命令适用于大型的系统,在此类系统中,用户一般都是一次同时生成的,而用 adduser 和 passwd 口令来对其一一进行设置一般说往往比较慢。
注意事项
因为可以使用文件重定向进行输入,即:chpasswd < user&passwd-filename, 如果输入文件是按非加密方式传递的话,请对该文件进行适当的加密。
又见
passwd(1),useradd(8),newuser(8)
#p#
NAME
chpasswd - update password file in batch
SYNOPSIS
chpasswd [-e]
DESCRIPTION
chpasswd reads a file of user name and password pairs from standard input and uses this information to update a group of existing users. Without the -e switch, the passwords are expected to be cleartext. With the -e switch, the passwords are expected to be in encrypted form. Each line is of the format
user_name:password
The named user must exist. The supplied password will be encrypted as necessary, and the password age updated, if present.
This command is intended to be used in a large system environment where many accounts are created at a single time.
CAVEATS
The input file must be protected if it contains unencrypted passwords.
SEE ALSO
passwd(1), newusers(8), useradd(8)
AUTHOR
Julianne Frances Haugh (jockgrrl@ix.netcom.com)