Operating System - HP-UX
1824996 Members
2132 Online
109678 Solutions
New Discussion юеВ

Re: NIS issue with ypwhich

 
SOLVED
Go to solution
Andrew Kaplan
Super Advisor

NIS issue with ypwhich

Hi there --

We have a ServiceGuard cluster with several packages and NIS configured such that one server is the Master, and the other is the Slave.

When I do a ypwhich on the Master, the Master server hostname is the ouput that I see onscreen. However, when I do the same on the Slave, the name of one of the packages is what is seen as opposed to the hostname of the Master.

How can I correct this so that the hostname of the Master is the onscreen output on the Slave? Thanks.
A Journey In The Quest Of Knowledge
10 REPLIES 10
Jeff_Traigle
Honored Contributor
Solution

Re: NIS issue with ypwhich

If you run ypbind on the client with the -ypset option, you can use the ypset command to change the binding.
--
Jeff Traigle
Steven Schweda
Honored Contributor

Re: NIS issue with ypwhich

Actual commands used with their actual output
might be clearer than this description.

> How can I correct this [...]

What info would you like?

"ypwhich -m"?
Andrew Kaplan
Super Advisor

Re: NIS issue with ypwhich

I tried using the -ypset option, but that does not seem to have worked. Just so we are on the same page: what is the full syntax to use?
A Journey In The Quest Of Knowledge
Jeff_Traigle
Honored Contributor

Re: NIS issue with ypwhich

You'd run ypbind like:

ypbind -ypset

(You can set the option with YPBIND_OPTIONS in /etc/rc.config.d/namesvrs for use at startup.)

To change the binding from the server:

ypset -h client server
--
Jeff Traigle
Dave Olker
Neighborhood Moderator

Re: NIS issue with ypwhich

What operating system are your NIS systems running?

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Andrew Kaplan
Super Advisor

Re: NIS issue with ypwhich

Hi there --

The operating system for both servers is HPUX 11i v1.
A Journey In The Quest Of Knowledge
Dave Olker
Neighborhood Moderator

Re: NIS issue with ypwhich

Hi Andrew,

11i v1 and newer systems offer a preferred method of configuring a system to contact specific NIS servers - "ypinit -c". When you use this command it prompts you for a list of NIS servers in the order you want the client to bind to them. These systems can be on remote subnets, local subnets, etc.

In my opinion this is a far superior solution to using ypset or reverting to the normal UDP broadcasting mechanism, which is probably how you're getting bound to a package alias IP address.

Regards,

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Andrew Kaplan
Super Advisor

Re: NIS issue with ypwhich

Hi there --

I ran the ypinit command with the following syntax:
ypinit -s cosmos1

I had the procedure continue on non-fatal errors, and allowed for the existing directory to be overwritten.

There were several errors concerning the ethers.byaddr, ethers.byname, netmasks.byaddr, and bootparams files. I know the two ethers files can be safely ignored, but I am concerned about the latter two files.

I had also had two follow questions:
1. /etc/hosts file on the slave server does not match that of which is on the master. Can I simply copy the file that is on the master to the slave, or is there a better method?

2. /etc/passwd file on the slave server does not match that of which is on the master. Is that by design, or should the two be the same? Thanks.




A Journey In The Quest Of Knowledge
Dave Olker
Neighborhood Moderator

Re: NIS issue with ypwhich

Hang on, you're getting into completely different topics here. You're original thread topic was "how can I get my NIS system to bind to a specific server". That's what the "ypinit -c" comes in.

Now you're talking about setting up an NIS Slave and how to distribute maps. Is there another problem you're trying to solve or is this somehow related to the original thread topic?

Dave


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Andrew Kaplan
Super Advisor

Re: NIS issue with ypwhich

Oops...Sorry about that. I'll put those in another thread. Thanks for the help in any event.
A Journey In The Quest Of Knowledge