1834647 Members
2520 Online
110069 Solutions
New Discussion

Re: NIS Problem

 
SOLVED
Go to solution
Jim Adamson
Frequent Advisor

NIS Problem

Can anyone help me with a NIS problem.

I have recently set up two new J class workstations as NIS slave servers using the ypinit -s (nis master) command. The nis maps where transferred correctly and I then edited the namesvrs file.

The problem is that the NIS master is not updating these NIS slaves. The ypservers.pag file under /var/yp/(nisdomain) does not include the hostnames of the new nis slaves. This file also includes the hostname of an old 720 workstation which was a nis slave but has been replaced by one of the J-class boxes. Can I manually edit the ypserver.pag file on the nis master to add and remove nis slave servers?

One more thing, I can manually update the nis maps on the slave servers using the ypxfr command.

Any help would be gratefully received,
thanks,
Jim.
Oh dear
6 REPLIES 6
Jim Adamson
Frequent Advisor

Re: NIS Problem

I forgot to mention that we use HP-UX 10.20.
thanks,
Jim.
Oh dear
Lasse Knudsen
Esteemed Contributor
Solution

Re: NIS Problem

Youre ritht that you are missing the names of the new servers:

Look here:

--

ypcat -k ypservers > /tmp/ypservers
echo "name_of_new_nis_server1" >> /tmp/ypservers
echo "name_of_new_nis_server2" >> /tmp/ypservers

cd /var/yp/
makedbm /tmp/ypservers ypservers

---

Now you can do ypcat -k ypservers to see if
they are contained in the ypservers map.

The maps should be pushed next time you run ypmake (and changes have been made to your source files)
In a world without fences - who needs Gates ?
Lasse Knudsen
Esteemed Contributor

Re: NIS Problem

And off course you can just use your favourite editor to edit /tmp/ypservers if you want to delete an old nis server
In a world without fences - who needs Gates ?
Chris Garman
Frequent Advisor

Re: NIS Problem

When I have changed the NIS configuration like that in the past, it is fine to re-initialise the master NIS system even though it is already configured. This ypinit script then prompts you again for all the slave servers.
Jim Adamson
Frequent Advisor

Re: NIS Problem

Thanks Allan,
Brilliant, NIS appears to work fine now. What did you mean when you said 'changes have been made to your source files'?

Also, thanks Chris for your additional comments.
Oh dear
Lasse Knudsen
Esteemed Contributor

Re: NIS Problem

Hi Jim,

I just meant that in order to get the maps pushed by 'ypmake', changes have to be made to the files you build your NIS maps from.

This is usually the files in /etc/(passwd,group,services) etc. a 'touch ' is enough to trigger 'ypmake' into rebuilding and pushing the maps.
In a world without fences - who needs Gates ?