Operating System - HP-UX
1833059 Members
2637 Online
110049 Solutions
New Discussion

NIS client with 2 distinct servers ?

 
SOLVED
Go to solution
Lior Mishkovsky
Advisor

NIS client with 2 distinct servers ?

Hi,

Is there a way to define 2 NIS servers. The usuall choice is between broadcast or to connect directly to a specified machine - can i define 2 of those ?!
(HPUX11.22/11.00)

Lior./
12 REPLIES 12
steven Burgess_2
Honored Contributor

Re: NIS client with 2 distinct servers ?

Hi

You can only have one master in a domain. If the master isn't available you use the slave as defined in /etc/rc.config.d/namesvrs

Regards

Steve
take your time and think things through
V. V. Ravi Kumar_1
Respected Contributor

Re: NIS client with 2 distinct servers ?

Hi,

U can only have one NIS master server in a domain.

Regards
Never Say No
Balaji N
Honored Contributor

Re: NIS client with 2 distinct servers ?

hi,
configure one as the master and the other as a slave.
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Lior Mishkovsky
Advisor

Re: NIS client with 2 distinct servers ?

Hi,

Let me rewrite : I am an NIS CLIENT, need to configure 1st & 2nd servers (but not using broadcast method).
Please be specific/detailed.

Lior./
Zeev Schultz
Honored Contributor
Solution

Re: NIS client with 2 distinct servers ?

Lior,
option "-c" for ypbind builds a list
of NIS servers to bind to.The list is created
in /var/yp/binding//ypservers.
For more details read man page on ypbind.

Zeev
So computers don't think yet. At least not chess computers. - Seymour Cray
Zeev Schultz
Honored Contributor

Re: NIS client with 2 distinct servers ?

I beleive this flag was introduced
with 11.00 NIS patch PHNE_24034 (last one - PHNE_28102 ).On 11.11 - PHNE_28103.

cheers

Zeev
So computers don't think yet. At least not chess computers. - Seymour Cray
Shannon Petry
Honored Contributor

Re: NIS client with 2 distinct servers ?

There is no standard method for doing this. You can only specify 1 server in the /etc/rc.config.d/namesrvs file.

However, you can write your own script to change this at boot time by pinging the primary and secondary servers, and changing the variable as needed.

I have on occastion written scripts which look to see if yp is bound, and if not will kill ypbind, run ypset and check and bind to the appropriate server.

If you reboot and use the broadcast option, the clients will try and find the best server and bind to it. This is the recommended method.

Regards,
Shannon
Microsoft. When do you want a virus today?
Zeev Schultz
Honored Contributor

Re: NIS client with 2 distinct servers ?

Shannon,
default method for configuring Sun Solaris NIS
clients afaik was ever - 'ypinit -c',Hp just followed Sun as NIS code comes from there."-c"
flag is pretty recent in hp-ux.

Regards,

Zeev
So computers don't think yet. At least not chess computers. - Seymour Cray
Zeev Schultz
Honored Contributor

Re: NIS client with 2 distinct servers ?

Lior ,sorry for typo -
"ypinit -c" not "ypbind -c".
man ypinit .

Zeev
So computers don't think yet. At least not chess computers. - Seymour Cray
Lior Mishkovsky
Advisor

Re: NIS client with 2 distinct servers ?

Zeev,

In the 10.20/11.00 systems this option did not exist, therefor I didn't try it anymore (ypinit -c).
Thanks for your help - it worked on 11.22 system.
Are there patches for 10.20/11.00.
Is there a reasinable way to test it (without taking down the master) ?

Lior./
Zeev Schultz
Honored Contributor

Re: NIS client with 2 distinct servers ?

Patch for 11.00 is PHNE_28102.
It requires reboot and has (at least) 5 another
patches dependant on.
As to shutdown the master server - why should
you do that?ypinit -c is a client option.
So computers don't think yet. At least not chess computers. - Seymour Cray
Lior Mishkovsky
Advisor

Re: NIS client with 2 distinct servers ?

Zeev,

1st - thanks for the patch information.
I wanted to know if there is a "nondistructive" way to test the client configuration ("without shuting down the 1st NIS machine/service).

Lior./