Operating System - HP-UX
1848780 Members
9940 Online
104036 Solutions
New Discussion

NIS configuration in HP-UX 11.00

 
Amruth
Regular Advisor

NIS configuration in HP-UX 11.00

Hi all,

I am installing some new HP C-class workstations on a network which is having a NIS master server and DNS enabled. I want to know how can i make a workstation an NIS client. The workstations are loaded with HP-UX 11.00.

I also want to know how can i implement an NIS network.

I am new to NIS and DNS environment.

Thanks in advance,
amruth
If i am doing the same way you are doing to me then what is the difference between us.
6 REPLIES 6
Santosh Nair_1
Honored Contributor

Re: NIS configuration in HP-UX 11.00

To configure the NIS client, edit the /etc/rc.config.d/namesvrs and change the line that says NIS_CLIENT=0 to NIS_CLIENT=1. You'll also have to set NIS_DOMAIN to your nis domain. Once this is done, just run /sbin/init.d/nis.client start. If everything is set up properly, your machine should bind to the NIS server and become a client.

You can check if everything worked by doing a ypwhich to find out which machine you're bound to, then do a ypcat on one of the NIS maps, e.g. ypcat passwd. You should see a stream of password entries from the NIS server.

Finally, set up your nsswitch.conf file so that it points to NIS in addition to the local files...see /etc/nsswitch.nis for examples...or just move this file to /etc/nsswitch.conf.

Hope this helps.

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

Re: NIS configuration in HP-UX 11.00


Thanks for your help.

I want to know ; if i am doing the same for clients what will happen to the existing /etc/passwd file of the clients.

Is it will be updated from the master server.

regards,
ajith
If i am doing the same way you are doing to me then what is the difference between us.
Santosh Nair_1
Honored Contributor

Re: NIS configuration in HP-UX 11.00

As for the existing client's password file, it depends on how /etc/nsswitch.conf is configured, i.e. if you have the line

passwd: files nis

then the local /etc/passwd gets consulted first before the NIS passwd.

-Santosh
Life is what's happening while you're busy making other plans
A. Clay Stephenson
Acclaimed Contributor

Re: NIS configuration in HP-UX 11.00

Your next step on the NIS clients is to update the /etc/passwd and /etc/group file so that
NIS is used. The rule is check the local files first then examine the NIS map.

1) Make sure that you are logged in as root in at least two sessions so that you can get yourself out of trouble as fast as you got yourself in.
2) Using vi edit /etc/passwd and the client and
remove the unwanted entries. It is a good idea to keep those with low uids in the file. Always keep root locally. I would keep root,daemon,bin,sys,lp,uucp,adm,and nuucp. If you want other users to have their passwd's defined on the local machine, keep them also.

You then add this entry as the last entry in the passwd file:
+::-2:60001:::
When login does not find an entry in the local passwd file and it sees the '+' entry it then consults the NIS passwd map.

The same method is used on the group file:
I would at least keep root,bin,sys,adm,daemon,mail,lp,tty
You then add this entry to the end:
+:*:*

I would also get the O'reilly book 'Managing NFS and NIS'; it really helps especially if you are going to be using the automounter - the next logical step.

Regards, Clay
If it ain't broke, I can fix that.
Amruth
Regular Advisor

Re: NIS configuration in HP-UX 11.00

Ok i understood.

If you can, please explain NIS in few words and if time allows please expain with an example and how updation of maps works and all..

I have to do all in one shot and is some what critical for me.

Hope you can..
amruth
If i am doing the same way you are doing to me then what is the difference between us.
Santosh Nair_1
Honored Contributor

Re: NIS configuration in HP-UX 11.00

NIS = Network Information Services

Also see the docs at docs.hp.com:

http://docs.hp.com:80/cgi-bin/onlinedocs.py?mpn=B1031-90048&service=hpux&path=../B1031-90048/00/00/1&title=Installing%20and%20Administering%20NFS%20Servicesystems

All the information that you asked for is very well documented there.

Hope this helps.

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