System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

NIS problem in NIS master server

kvsheejith
Advisor

NIS problem in NIS master server

when i run the command in NIS master server

#ypxfr ypservrs

ypxfr: cant get master of ypservers

reason : ypmap is defective

1) What would be wrong?
8 REPLIES
Dennis Handly
Acclaimed Contributor

Re: NIS problem in NIS master server

Are you running HP-UX?
kvsheejith
Advisor

Re: NIS problem in NIS master server

i am running hp unix version 11
Dennis Handly
Acclaimed Contributor

Re: NIS problem in NIS master server

>I am running hp-ux version 11

All supported version of HP-UX start with 11: 11.11 11.23 11.31
Fred Ruffet
Honored Contributor

Re: NIS problem in NIS master server

Did you ran ypmake on server ?

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
kvsheejith
Advisor

Re: NIS problem in NIS master server

Can you please tell me the proceedure step by step. so that i will come to know where i made the mistake
Kranti Mahmud
Honored Contributor

Re: NIS problem in NIS master server

mvpel
Trusted Contributor

Re: NIS problem in NIS master server

Each NIS map has at least two additional keys that are interpreted by the YP utilities, YP_MASTER_NAME and YP_LAST_MODIFIED:

http://docs.sun.com/source/806-4251-10/referenc.htm

# YP_MASTER_NAME
# YP_INTERDOMAIN (set with -b option)
# YP_SECURE (set with -r option)
# YP_DOMAIN_NAME (set with -d option)
# YP_OUTPUT_NAME
# YP_INPUT_FILE

As I recall your error indicates that your ypservers map does not have the YP_MASTER_NAME key in it. If you do a dbm -u ypservers it'll dump all the key-value pairs in the database that was built by ypmake.
mvpel
Trusted Contributor

Re: NIS problem in NIS master server

The easiest fix is to copy a known-good version of the ypservers.dir and ypservers.pag files from the NIS master down to this slave server using FTP or what have you, rather than ypxfr. They'll be in /var/yp/`domainname` on the slave, as I recall.