1832867 Members
2927 Online
110048 Solutions
New Discussion

Re: NIS client setup

 
SOLVED
Go to solution
Terry Washington_1
Frequent Advisor

NIS client setup

Does anyone know the command-line steps to setup an NIS client in HP-UX 11i?
5 REPLIES 5
A. Clay Stephenson
Acclaimed Contributor

Re: NIS client setup

The initial steps are easy but the remaining steps depend upon what you want NIS to do. Manage usernames, groups, automount maps, services, hosts, ...

1) edit /etc/rc.config.d/namesvrs
and set NIS_CLIENT=1
and NIS_DOMAIN="acme" (or whatever your domain is)

2) /sbin/init.d/nis.client start

Now you must alter /etc/passwd, /etc/nsswitch.conf, /etc/groups, automount maps, ... depending upon your needs.
If it ain't broke, I can fix that.
Terry Washington_1
Frequent Advisor

Re: NIS client setup

Thanks for the reply. I think that I am very close. Here is what I have done so far.
1. Added the NIS master and slave servers to /etc/hosts.
2. Ran the domainname command.
3. Copied /etc/nsswitch.nis to /etc/nsswitch.conf
4. Edited /etc/rc.config.d/namesvrs as suggested.
5. Ran /sbin/init.d/nis.client start.

The nis.client script started ypbind and keyserv but could not bind to the local domain. I also found that the system would no longer resolve hostnames and nsslookups failed. I stopped nis.client and was able to resolve hosts again. Is there somplace that I need to add the NIS servers or am I missing something else. I am planning on using only the password and group databases within NIS.
Shannon Petry
Honored Contributor
Solution

Re: NIS client setup

If your system is not on the same subnet then you will have to force a ypbind address for the domain.

Set the YPBIND_OPTIONS="" in /etc/rc.config.d/namesvrs file to YPBIND_OPTIONS="-ypset".

Then set the YPSET_ADDR="" in /etc/rc.config.d/namesvrs file to YPSET_ADDR="ip.of.server".

Simple things like the broadcast being different will cause failures to bind, as the ypbind process uses the broadcast address to find a NIS server. The broadcast address is defined by the netmask in the IF configuration. /etc/rc.config.d/netconf will get you started. WARNING: You should make backup copies of these files in case you oops ;)

Regards,
Shannon
Microsoft. When do you want a virus today?
Terry Washington_1
Frequent Advisor

Re: NIS client setup

Thanks! That was the missing info that I needed.