Operating System - HP-UX
1753797 Members
7405 Online
108799 Solutions
New Discussion юеВ

Re: yppush command syntax question

 
Andrew Kaplan
Super Advisor

yppush command syntax question

Hi there --

I recently merged two NIS domains into one, and even though I ran the ypmake on the master server, and ypinit on the slave servers, I discovered that not all the maps were propogated from the master to the slaves.

I was going to use the yppush command to synchronize the maps between the master and the slaves, but I wanted to know what would be the correct syntax to use to ensure that all maps were progogated correctly. Thanks.
A Journey In The Quest Of Knowledge
5 REPLIES 5
Andrew Kaplan
Super Advisor

Re: yppush command syntax question

This is a followup to my previous posting. I ran the yppush command using the syntax shown below on the master NIS server, and the output I received is shown below:

# yppush -v netgroup
Finding NIS servers:Map ypslaves.space unknown NIS client error code -- using ypservers
nptc-rtp1 rtp51 rtp37 cosmos1 cosmos2
cosmos2 has been called.
cosmos1 has been called.
nis server not registered at rtp37.
rtp51 has been called.
Status received from ypxfr on rtp51:
Transfer not done: master's version isn't newer.
nptc-rtp1 has been called.
Status received from ypxfr on nptc-rtp1:
Transfer not done: master's version isn't newer.
Status received from ypxfr on cosmos1:
Transfer not done: master's version isn't newer.
Status received from ypxfr on cosmos2:
Transfer not done: master's version isn't newer.

Since the servers in question have newer versions of the NIS map, is there a command syntax that I can use to force the servers to accept the version coming from the master, or should I delete the netgroup file on the slave servers and rerun the push?
A Journey In The Quest Of Knowledge
Steven Schweda
Honored Contributor

Re: yppush command syntax question

> [...] is there a command syntax [...]

man yppush

I see none. Have you tried "touch" on the
master map source file(s), and then a fresh
ypmake and/or yppush?

Knowing nothing about which of these systems
is which, and who's a server, and so on, it's
a bit tough to interpret these messages.

> This is a followup to my previous posting.

URL? Pertinent details?

There's something to be said in favor of
"ypinit [ -m | -s ]" on every server,
followed by yppush on the master.
Andrew Kaplan
Super Advisor

Re: yppush command syntax question

Hi there --

I did some further checking, and here is the procedure that, hopefully, will solve this problem:

1. Run ypinit -m on the master server.
2. Run ypinit -s on the slave servers.
3. Run yppush on the master server.

The only question I have is, do I need to run yppush multiple times on the master server, or is there a way to push all maps in a single command?

Thanks.


A Journey In The Quest Of Knowledge
Steven Schweda
Honored Contributor

Re: yppush command syntax question

> The only question I have [...]

I thought that a bare "yppush" would do them
all, but I'll admit that if "man yppush" says
that, then I don't see it.

Apparently ("man yppmake"), ypmake will push
everything (unless you stop it.)

Only one way to find out.
mvpel
Trusted Contributor

Re: yppush command syntax question

In order for yppush on the master server to start pushing a map, there has to already be a copy of that map on the slave server.

You can use FTP / SCP to "seed" the slaves with the master's .dir and .pag files, after which the yppush will work as expected.

Or, you could run "ypxfr -f -h masterserver" for each map on each slave server - the "-f" is "force" which causes the slave to ignore the timestamps, and the "-h" option tells it which host to use in the absence of a YP_MASTER_SERVER key in a local copy of the map.

The "newer" question is answered by the YP_LAST_MODIFIED key/value pair in the map file. If you brought in map databases from two different domains, it's possible that the timestamps don't match up as you expect.

You should also make sure that the master and slave servers' clocks are reasonably synchronized.