1753773 Members
5087 Online
108799 Solutions
New Discussion юеВ

NIS problem

 
kvsheejith
Advisor

NIS problem

I am using HP -unix 11.11.

I have one NIS server hostA and NIS Slave hostB both are running with hp unix.

Problem is

1] Unable to transfer map
2] Unable to do "/usr/sbin/makedbm -u ypservers " it says canot init ypservers
3] New NIS users are unable to login.

If i give ypwhich in slave i am getting proper result and if i give "ypwhich -m passwd" it is showing my NIS server

i am attaching /var/yp/ypxfrd.log file


Please help me resolve this issue
7 REPLIES 7
mvpel
Trusted Contributor

Re: NIS problem

In order for a ypxfr to work properly, the target map (.dir and .pag files) must first exist on the slave server. This allows the ypxfr command to query the YP_MASTER_NAME key in the map, to determine which host it should contact.

This is the meaning of the "can't get master" error message.

If you specify "-h hostA" then the slave will know which host to contact without that, but I'm not sure if it will be able to transfer if the map doesn't already exist: "no such map in server's NIS domain." Try it and see what happens.

I find the most straightforward approach is to first scp or ftp all the .dir and .pag files from the master to the slave server, after which the normal ypxfr/yppush operations will function as expected.
V. Nyga
Honored Contributor

Re: NIS problem

Hi,

you don't need to transfer the maps from the nis server to clients (not slave servers). It's the meaning of nis to do this only at the server.
You have to publish the informations to the clients.
After changes at the server, this you'll do with '/var/yp/ypmake', see also 'man ypmake'.

Then the clients can read the new informations.

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
kvsheejith
Advisor

Re: NIS problem

What are the steps i have to try ? and why

A] Unable to do "/usr/sbin/makedbm -u ypservers " it says canot init ypservers?

B] New NIS users are unable to login ?


Thanks
Sheejith
V. Nyga
Honored Contributor

Re: NIS problem

Hi again,

you have no maps for nis users - no passwd, no group.

Since 11.11 is no longer supported by HP I can't find the right dokumentation.
I hope this one may help, too:
http://docs.hp.com/en/5992-0714/ch04s03.html
http://docs.hp.com/en/5992-0714/ch08s02.html

Try this one:
Issue the following commands to regenerate the NIS passwd maps from /etc/passwd.yp:

'cd /var/yp'
'/usr/ccs/bin/make passwd'

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
mvpel
Trusted Contributor

Re: NIS problem

What are the steps i have to try ? and why

A] Unable to do "/usr/sbin/makedbm -u ypservers " it says canot init ypservers?

B] New NIS users are unable to login ?
-----

A] The "couldn't init" message suggests that you're trying to run the command when you're not in the directory where the .dir and .pag files for ypservers database are stored. Log in to either the master or slave server, and either:
makedbm -u /var/yp/`domainname`/ypservers

or "cd /var/yp/`domainname`" and then run your makedbm -u.

You won't be able to run makedbm -u on a client unless:

ypcat ypservers > ypservers.txt
makedbm -d `domainname` -m hostA ypservers ypservers
makedbm -u ypservers

Which is pointless, of course.

[B] When there's no new NIS users able to log in when the NIS clients are bound to the slave server, not the master, then it indicates that the NIS map transfer process is not working properly. As I mentioned above, just FTP all the .dir and .pag files from the master to the slave, and insure that the yppush (master) and ypxfr (slave) cron jobs are running properly.

If no new NIS users are able to log in regardless of whether the machine is bound to the master or the slave server, then it indicates a problem with the map build process in "ypmake." That's unusual, though, since it's mature, stock code under the hood.

As for the steps you should try - like I said before, FTP the .dir and .pag files from the master to the slave, in order to "seed" the slave so that the yppush/ypxfr has something to work with. You generally can't yppush or ypxfr a map until you already have a copy of that map on the slave server.
V. Nyga
Honored Contributor

Re: NIS problem

Hi all!

Please pay attention about what we want to talk!

kvsheejith is talking about one nis server and one nis slave

mvpel is talking about nis master server and nis slave server.

@kvsheejith: do you have a 'nis slave server' or a slave as a 'client'?

V.
*** Say 'Thanks' with Kudos ***
mvpel
Trusted Contributor

Re: NIS problem

It's obvious from the wording of the original message what he's talking about:

"I have one NIS server hostA and NIS Slave hostB both are running with hp unix. ... if i give 'ypwhich -m passwd' it is showing my NIS server"

This means that his "hostA" is the NIS master and hostB is the NIS slave. No need to get hung up on the various possible meanings of the word "server" here.

Every (99.99999%) NIS server is also an NIS client, anyway.