LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1829|回复: 5

yppasswd: can't find the master ypserver. NIS internal error

[复制链接]
发表于 2005-10-29 10:34:17 | 显示全部楼层 |阅读模式
I have configured NIS and it works fine, but after sometime, when i tried to run yppasswd to change password,

#yppasswd user1
yppasswd: can't find the master ypserver. NIS internal error

Restart of ypserv or yppasswdd won't help...

Have anyone encountered this problem?  I googled, but still have no clue....hope some luck here...
发表于 2005-10-29 16:42:31 | 显示全部楼层
i know the another way
use "passwd user1"
and then get into Dir /var/yp/   make it
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-29 21:52:41 | 显示全部楼层
Thanks for the reply.

Your way works, but I am more confused.

1. useradd user1
2. passwd user1
3. "ypinit -m" to create NIS database and make user1 a NIS user.
4. "yppasswd user1" to assign NIS passwd to user1.

Do I misunderstand anything? I thought yppasswd is used to assign local user another NIS password, as what we did for samba user....Maybe I am wrong?

5. If later I add a new system local user called user2 (useradd user2; passwd user2), what do I need to do to add it as a NIS user? "ypinit -m" or just get into Dir /var/yp/ and run "make"?
回复 支持 反对

使用道具 举报

发表于 2005-10-30 09:27:16 | 显示全部楼层
just get into Dir /var/yp/ and run "make"
i think ypinit -m is used just at seting up ypserv to assgin which NIS server's database need to be created
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-30 09:29:33 | 显示全部楼层
I did more tests and get more confused

It seems you don't need to run "yppasswd nisuser" to assign the initial nis password. Once after you run "ypinit -m" to build the database, the nis user get the same nis password as the local password.

Later if you want to change user password, two ways:

1. yppassed nisuser
or
2. passwd nisuser; go to /var/yp to make.

But I am a little bit confused:
使用passwd改变nisuser的密码 without running /var/yp make,will it 改变服务器上的 /etc/passwd 和 /etc/shadow 文件?  Will it change NIS服务器中 /var/yp 的文件?

Does yppasswd only change this user's nis password? Or it change both this user's nis password and local password?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-10-30 10:44:17 | 显示全部楼层
More tests and I understand everything

1. It seems you don't need to run "yppasswd nisuser" to assign the initial nis password. Once after you run "ypinit -m" to build the database, the nis user get the same nis password as the local password.

2. Later if you want to change user password, two ways:

a. yppassed nisuser: it change both this user's nis password and local password, which means this user can log on server and client using the same password.

b. passwd nisuser, do NOT go to /var/yp to make.

   it will only 改变服务器上的 /etc/passwd 和 /etc/shadow 文件, but will NOT change NIS服务器中 /var/yp 的文件.  As a result, this user will use different password to log on local server and from remote client.

c. passwd nisuser and then /var/yp make ==> same as yppasswd. Local password and nis password are synchronized.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表