passwd(password)
passwd(password)功能说明:设置密码。
语 法:passwd [-dklS][-u <-f>][用户名称]
补充说明:passwd指令让用户可以更改自己的密码,而系统管理者则能用它管理系统用户的密码。只有管理者可以指定用户名称,一般用户只能变更自己的密码。
参 数:
-d 删除密码。本参数仅有系统管理者才能使用。
-f 强制执行。
-k 设置只有在密码过期失效后,方能更新。
-l 锁住密码。
-s 列出密码的相关信息。本参数仅有系统管理者才能使用。
-u 解开已上锁的帐号。
passwd
passwd [options] [user]
Create or change a password associated with a user name. Only the owner or a privileged user may change a password. Owners need not specify their user name. Users can change their own passwords. For any other operation, you must be root.
Options
Delete the password for the user's account.
Force the operation. Overrides -u.
Display a help message describing the options. See also --usage.
Set the number of days after a password has expired before the account is disabled.
Keep passwords (authentication tokens) that have not expired.
Lock the user's account.
Set the minimum number of days that the password is valid.
Print the status of the user's password.
Read new passwords from standard input.
Unlock the user's account
Display a brief usage message. See also --help.
Set the number of days of warning users will get before their password expires.
Set the maximum number of days that the password is valid.