cancel
Showing results for 
Search instead for 
Did you mean: 

NIS server configuration

 
Omprakash_2
Frequent Advisor

NIS server configuration

Hi,

Can any one provide me the NIS server configuration details. I planned to migrate old NIS server to new one.
I am new to NIS, if possible request you to provide a notes.
2 REPLIES
點燃
Valued Contributor

Re: NIS server configuration

Hi,

Please have a look on these links

http://www.docs.hp.com/en/B1031-90043/ch04s03.html


http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1237353433771+28353475&threadId=985036

Regards!
Man's mind, once stretched by a new idea, never regains its original dimensions
Sunny Jaisinghani
Trusted Contributor

Re: NIS server configuration

2.2 NIS Master Server Configuration
2.2.1 Create a master passwd file

1. Copy the /etc/passwd file from each host in your NIS domain to the /etc directory on the host that will be the master server. Name each copy /etc/passwd.hostname, where hostname is the name of the host it came from
2. Concatenate all the passwd files together, including the master serverâ s passwd file, into a temporary passwd file, as follows:


cd /etc
cat passwd passwd.hostname1 passwd.hostname2... > passwd.temp

3. Issue the following command to sort the temporary passwd file by user name:
sort -o /etc/passwd.temp -t: -k1,1 /etc/passwd.temp

4. Examine /etc/passwd.temp for duplicate user names. If you find multiple entries for the same user, edit the file to remove redundant ones. Make sure each user in your network has a unique user name.
5. Issue the following command to sort the temporary passwd file by user ID:

sort -o /etc/passwd.temp -t: -k3n,3 /etc/passwd.temp

6. Examine /etc/passwd.temp for duplicate user IDs. If you find multiple entries with the same user ID, edit the file to change the user IDs so that no two users have the same user ID.
7. Move /etc/passwd.temp (the sorted, edited file) to /etc/passwd. This file will be used to generate the passwd map for your NIS domain.
8. Remove all the /etc/passwd.hostname files from the master server.


2.2.2 Create a master group file

Repeat the same procedure for master group file as done for master passwd file.
2.2.3 Create a master hosts file

Repeat the same procedure for master hosts file as done for master passwd file.

2.2.4 Enable the NIS Master Server capability

1. Log in as root to the host that will be the master server.
2. On the host that will be the master server, ensure that the $PATH environment variable includes the following directory paths:
a. /var/yp
b. /usr/lib/netsvc/yp
c. /usr/ccs/bin
3. Issue the following command to set the NIS domain name:
/usr/bin/domainname <.....>

4. In the /etc/rc.config.d/namesvrs file, set the NIS_DOMAIN variable to the domain name:

NIS_DOMAIN=<......>

5. In the /etc/rc.config.d/namesvrs file, set the NIS_MASTER_SERVER and NIS_CLIENT variables to 1, as follows:
NIS_MASTER_SERVER=1
NIS_CLIENT=1

6. Issue the following command to create the NIS maps for the domain:
/usr/sbin/ypinit -m

The ypinit script will prompt you for the names of your slave servers. Enter the names of your slave servers in response to the prompt.
7. Issue the following commands to run the NIS startup scripts:
/sbin/init.d/nis.server start
/sbin/init.d/nis.client start


2.2.5 Verify the NIS Master Server configuration

Logon to the NIS master server and execute the following command

ypwhich -m