[SOLVED] ypserv.service needs restart after adding new user

Issues related to configuring your network
Post Reply
nvanvliet
Posts: 9
Joined: 2015/05/06 08:54:53

[SOLVED] ypserv.service needs restart after adding new user

Post by nvanvliet » 2015/05/20 11:41:17

Hi,

I recently replaced our Solaris NIS server with a Centos 7 machine. The NIS clients are all ubuntu 12.04 and 14.04.
Today I added a new user to the server for the first time (I had already added a ot of them during installation ofcourse), basically using the useradd command in a little script that also does a

Code: Select all

cd /var/yp
and

Code: Select all

make
.

After doing this I noticed something very strange.
On the clients the new user was not known (id and su not working). Restarting ypbind did not help
doing a

Code: Select all

ypcat passwd
I could see the user.
Running

Code: Select all

yptest
showed the user in Test 9 yp_all, but NOT in yp_first/yp_next

Finally doing a

Code: Select all

systemctl restart ypserv.service
on the centos server fixed everything.
It is still possible ofcourse that i made some misstake, but to me this looks like a bug, likely in centos.

Any comments and tips are appreciated.
Nico

nvanvliet
Posts: 9
Joined: 2015/05/06 08:54:53

Re: ypserv.service needs restart after adding new user

Post by nvanvliet » 2015/05/20 12:10:39

There is more strangeness going on. I can not use yppasswd on the clients:

Code: Select all

yppasswd 
No such map
yppasswd: unknown user (uid=1100).
I need to change the password on the server and restart ypserv

nvanvliet
Posts: 9
Joined: 2015/05/06 08:54:53

Re: [SOLVED] ypserv.service needs restart after adding new u

Post by nvanvliet » 2015/05/21 12:56:34

Hi,

It is fixed. There were 2 problems with the configuration on the server.
First 127.0.0.1 needed to be in /var/yp/securenets for ypserv to work properly (new user)

Second, I use 2 networks on each server. The university network on the first network adapter, and a private network 192.168.0.0/16 on the second adapter.
I added 192.168.0.0/16 to /var/yp/securenets and told the clients that the server is on the 192.168.0.0/16 network.
Yet ypbind chooses to access the server from the univerity network and i had to add those IP adresses to /var/yp/securenets to make yppasswd work

Regards,
Nico

Post Reply