Operating System - HP-UX
1832757 Members
3186 Online
110045 Solutions
New Discussion

Re: Changing NIS domain name

 
Huiqi Liu
Occasional Advisor

Changing NIS domain name

We have just changed our NIS domain name on the fly - which itself wasn't particularly troublesome, except one small problem on machines running HP-UX 11. The problem is no new users can log in on these machines, ypcat passwd shows the correct entries in the passwd map, but when you do a "su - username" it says "unknown user". I do realise the quickest solution would be to do a reboot but I can't at the moment due to heavy workload. Machines running HP-UX 10x didn't require reboots.

Any suggestions? Thanks.
5 REPLIES 5
Alan Riggs
Honored Contributor

Re: Changing NIS domain name

What does domainname return for the server in question? Does it match your new change? I asssume you have edited the config files and recycled nis servers and client services on all boxes. Does ypwhich -m show that maps are being resolved to the proper place?
Huiqi Liu
Occasional Advisor

Re: Changing NIS domain name

Thanks for the reply.

domainname on the machines shows the new, correct domain name. Yes I restarted all the yp services and ypwhich -m lists the correct maps. (The config files have been modified too, which I guess will only be read at the next reboot). "ypmatch newuser passwd" even returns the correct info. But su - newuser doesn't work (nor telneting and trying to log in as the new user). Like I said, a reboot will definitely fix it - but what is causing this problem? Very intriguing.
Antoanetta Naghiu
Esteemed Contributor

Re: Changing NIS domain name

Try to stop and restart nis client.
/sbin/init.d/nis.client stop and again start.
Eventually manually push the maps to slaves (if you use nis slave in your config).
Any better?
Alan Riggs
Honored Contributor

Re: Changing NIS domain name

That is a good point. Try repushing all mapes (just issue ypmake from the master). I don't know why that would be necessary, but see what happens.

One last thing -- check /etc/passwd on the server to make sure the last line correctly refers login checks to NIS.
Huiqi Liu
Occasional Advisor

Re: Changing NIS domain name

Thanks for the replies.

Tried that (nis.client stop/start, yppush) and also made the machine to bind to the master using ypset. /etc/passwd file has correct entry and also played with nsswitch.conf file to no avail (currently has compat in passwd line).