Re: changing nis master

 
Tarek
Super Advisor

changing nis master

Hi all,
i need a help. I have changed the name and the ip address of the nis master server.
The clients and slave now point normally to it with its new name and ip address (in broadcast). Everything seemed ok. But now i'm having problems with nis users. When these try to enter to any client or slave or to the nis master, after password it takes about 5 minutes to enter. NFS is ok. In fact if i try to mount manually everythings works.
Now i noticed that if i issue ypwhich -m on the nis master server all maps points to itself with the old name. Could it be that the problem? Do i have to create again all nis maps? If i have to do that, do i have also modify nis clients and slaves?
Thanks
11 REPLIES 11
Sachin Patel
Honored Contributor

Re: changing nis master

Hi Tarek,
where are you Experts?????
I am not sure what to do.
1. Copy /var/yp/domainname to other location for backup.

on master to rebuild all maps.
# cd /var/yp/domain
#rm *.time
#cd /var/yp
#make NOPUSH=1 (will rebuild all maps and will not push it to other server)

If this doesn't work then try
#ypinit -m

Sachin
Is photography a hobby or another way to spend $
Sharon Prothero
Frequent Advisor

Re: changing nis master

If you haven't re-made any of your maps, the nis ypservers map will still contain the old name for your master.

Try the following (with your own NIS domain name)
copy /var/yp/domainname to safe location for backup.
# cd /var/yp/domainname
# ypcat -k ypservers > /tmp/serverlist.txt
edit /tmp/serverlist.txt to contain proper list of servers.
# makedbm /tmp/serverlist.txt ypservers
# yppush ypservers

If this isn't enough you may need to remake all the maps and push 'em out again.
Sachin Patel
Honored Contributor

Re: changing nis master

The more I think more I convience myself that you have to run ypinit -m. This will ask you all of your slave servers name. you can get there list using ypcat -k ypserveres.

99% you have to run ypinit -m on master.
Make sure that you have all files in /etc/ uptodate. passwd, auto.direct, hosts, groups, networks, netgroups, aliases etc.....

check your /var/yp/Makefile for this file list.

Sachin
Is photography a hobby or another way to spend $
Tarek
Super Advisor

Re: changing nis master

Thanks both.
Sachin it hasn't work. I think i have to make
ypinit -c.
Before that i noticed an error while trying to make what Sharon told me.
While i issue yppush ypservers i have:
bind_to_server clntudp_create error: RPC_PMAP_FAILURE - RPC_PMAP_FAILURE
What's this error? Can i try ypinit -c or it will give same error and i would have problems...
Thanks again
Tarek
Super Advisor

Re: changing nis master

I issued ypinit -m on the nis master server and maps were created.
Now i tried to add a nis slave but while i issue ypinit -s NIS_server_name i have this error:
ypxfr: can't get order number for map netid.byname from ypserv at lthp12
reason: no such map in server's NIS domain

By your request, ypinit is quitting as a result of the error.

************ALL DATABASES BUILT THUS FAR HAVE BEEN DISCARED**************
Determine what the problem is, fix it and run ypinit all over again to create a complete set of databases.

Please help, it's urgent. Why i'm having this error?? what should i do?
Before i have added the nis slave on the nis master when i made the ypinit -m
Santosh Nair_1
Honored Contributor

Re: changing nis master

Tarek,

Before proceeding, you said that you set up the NIS server...can you verify that the server is okay, i.e. can you ypcat any of the maps?
Once this has been verified, on the slave, stop NIS.client, move /var/yp/domainname to something else for backup, then try running ypinit -s NISSERVER again.

-Santosh
Life is what's happening while you're busy making other plans
Tarek
Super Advisor

Re: changing nis master

If i issue ypcat passwd or others seems ok. Now i issued ypcat netgroup but i saw that this map is wrong. Inside there is the name of the old nis master and of the old nis domain.
What can i do??
I have followed the instructions of the manual:
Installing and administring NFS services
Hp 9000 Networking
Edition 7
Please help. All users aren't working.
Santosh Nair_1
Honored Contributor

Re: changing nis master

I'm assuming that the /etc/netgroup has the correct entries? In that case, you should just try remaking the netgroup mapfile, i.e. ypmake netgroup. This should make the new maps and then push it out.

If this doesn't work, you might have to recreate the NIS master, i.e. stop NIS.server, mv /var/yp/domain, and then ypinit -m again. Start up NIS.server and test that the server can ypcat all maps and they look correct, then proceed to remake the clients.

-Santosh
Life is what's happening while you're busy making other plans
Tarek
Super Advisor

Re: changing nis master

Many many problems. Thanks really Sachin for your help. Other times i have set nis without problems but now i'm having a lot.
I removed /var/yp/domainname on the nis master server, then i issued again ypinit -m, i put the name of the server and the slave then continued. Script begins and tells it would take from 5 to 10 minutes but if finished in less than 30 seconds !!! It tells me that nis master has been setted and there were no errors. So i make an ypcat of netgroup and i saw again that it has old entries with the old nis domainname. Now i tried a reboot.
So i tried configuring again nis slave and i have the same error i mentioned above but with a different map that is: ethers.byaddr
Again i configured a client but it doesn't bind to the master server. I have to start manually the nis client, stopping it before (also if it isn't working)... and then it binds to master.
really many confusion and i don't know where i'm wrong. I followed the procedure exactly as the book.
Any help again?