yppasswd 中文man页面

系统
在Linux中,标准的 passwd(1), chfn(1) 和 chsh(1) 不能够用来修改用户的NIS密码,shell和GECOS信息,它们只能修改本机上的密码文件. 要修改NIS信息,可以使用它们的NIS对应命令 yppasswd, ypchfn 和 ypchsh 来替代.

NAME(名称)

yppasswd, ypchfn, ypchsh - 修改你在NIS数据库中的密码  

SYNOPSIS(总览)

yppasswd [-f] [-l] [-p] [user]
ypchfn [user]
ypchsh [user]  

DESCRIPTION(描述)

在Linux中,标准的 passwd(1), chfn(1) 和 chsh(1) 不能够用来修改用户的NIS密码,shell和GECOS信息,它们只能修改本机上的密码文件. 要修改NIS信息,可以使用它们的NIS对应命令 yppasswd, ypchfnypchsh 来替代. 这些命令都是同一个程序,只是链接为不同的名字罢了. 使用命令行选项,你可以选择是否更新你的密码 -p, 你的登录shell -l, 你的GECOS字段 -f, 还是它们的并集. 如果没有指定其它选项的话, yppasswd 暗含了 -p 选项.如果你使用了 -f 或者 -l 选项,你也需要添加 -p 标识。 ypchfn 暗含了 -f 选项,而 ypchsh 则暗含了 -l 选项. 当不带 user 参数调用时,正在调用命令的用户的账号信息将被更新, 否则更新 user 的信息.该选项只对超级用户有用.如果服务器上的yppasswdd后台守护程序支持,你可以指定服务器的root密码来替换用户[老的]密码. 所有工具首先会提示用户当前NIS密码需要使用 yppasswdd(8) 后台守护程序认证.随后,程序提示以下更新信息:

yppasswd-l
修改用户的NIS密码.提示用户输入新的密码. 当输入密码时,响应是关闭的,这样密码不会显示在屏幕上.拒绝空的密码,这是因为密码短于6个字符.用户然后会要求重新输入密码以确证第一次没有拼错.
ypchsh or -l
修改用户的登录shell.提示用户输入新的shell,老的shell作为默认值:
Login shell [/bin/sh]: _
要接受默认值,只需按回车.要清除在你的 passwd(5) 文件中的shell字段(这样会选定系统的默认shell), 输入字符串 none.
ypchfn or -f
修改用户的全名和相关信息.按照惯例,一些应用程序需求 passwd(5) 文件的GECOS字段(字段4)包含用户的真名(与登录名相对应)和一些如办公室电话号码之类的附加信息.这些信息通过 finger(1) 和其他一些可能的工具显示.
当设置全名时, ypchfn 显示以下提示,默认值使用方括号括起:
Name [Joe Doe]:
Location [2nd floor, bldg 34]:
Office Phone [12345]:
Home Phone []:
要接受默认值,只需按回车.要清除一个字段,则输入字符串 none.

SEE ALSO(另见)

chfn(1), chsh(1), finger(1), passwd(5), passwd(1), ypcat(1), yppasswdd(8), ypserv(8), ypwhich(1)

#p#

NAME

yppasswd, ypchfn, ypchsh - change your password in the NIS database  

SYNOPSIS

yppasswd [-f] [-l] [-p] [user]
ypchfn [user]
ypchsh [user]  

DESCRIPTION

The standard passwd(1), chfn(1) and chsh(1) cannot be used under Linux to change the users NIS password, shell and GECOS information, because they only modify the password file on the local host. For changing the NIS information, they are replaced by their NIS counterparts, yppasswd, ypchfn and ypchsh. These commands are the same program, linked to different names. Using the command line switches, you can choose whether to update your password -p, your login shell -l, or your GECOS field -f, or a combination of them. yppasswd implies the -p option, if no other option is given. If you use the -f or -l option, you also need to add the -p flag. ypchfn implies the -f option, and ypchsh -l. When invoked without the user argument, the account information for the invoking user will be updated, otherwise that of user will be updated. This option is only available to the super-user. If the yppasswdd daemon on the server supports it, you can give the root password of the server instead of the users [old] password. All tools will first prompt the user for the current NIS password needed for authentication with the yppasswdd(8) daemon. Subsequently, the program prompts for the updated information:

yppasswd or -l
Change the user's NIS password.        The user is prompted for the new password.
While typing the password, echoing is turned off, so the password does not appear on the screen. An empty password is rejected, as are passwords shorter than six characters. The user will then be requested to retype the password to make sure it wasn't misspelled the first time.
ypchsh or -l
Change the user's login shell. The user is prompted for a new shell, offering the old one as default:
Login shell [/bin/sh]: _
To accept the default, simply press return. To clear the shell field in your passwd(5) file entry (so that the system's default shell is selected), enter the string none.
ypchfn or -f
Change the user's full name and related information. Traditionally, some applications expect the GECOS field (field 4) of the passwd(5) file to contain the user's real name (as opposed to the login name) plus some additional information like the office phone number. This information is displayed by finger(1) and probably some other tools, too.
When setting the full name, ypchfn displays the following prompts, with the defaults in brackets:
Name [Joe Doe]:
Location [2nd floor, bldg 34]:
Office Phone [12345]:
Home Phone []:
To accept a default, simply press return. To clear a field, enter the string none.

SEE ALSO

chfn(1), chsh(1), finger(1), passwd(5), passwd(1), ypcat(1), yppasswdd(8), ypserv(8), ypwhich(1)

责任编辑:韩亚珊 来源: CMPP.net
相关推荐

2011-08-24 16:48:36

man中文man

2011-08-15 10:21:09

man中文man

2011-08-11 16:11:49

at中文man

2011-08-25 10:21:56

man.conf中文man

2011-08-11 15:03:21

ACCESS中文man

2011-08-16 10:59:16

pwconv中文man

2011-08-19 18:30:52

ipc中文man

2011-08-25 17:18:07

putc中文man

2011-08-15 13:53:19

stat中文man

2011-08-25 15:24:31

execlp中文man

2011-08-15 18:06:07

restore中文man

2011-08-15 15:45:04

xpdf中文man

2011-08-24 17:06:42

NOTIFY中文man

2011-08-15 14:42:28

uname中文man

2011-08-15 11:30:37

pwd中文man

2011-08-23 14:24:42

ping中文man

2011-08-15 11:01:45

2011-08-25 17:15:16

printf中文man

2011-08-25 16:44:46

ftrylockfil中文man

2011-08-23 17:24:11

userdel中文man
点赞
收藏

51CTO技术栈公众号