NIS Configuration


Contents

About this document
    Related documentation
NIS master server configuration
Binding the master server
NIS client configuration
NIS slave configuration
Binding the slave server

About this document

This document contains the procedure to configure a Network Information Server (NIS) master server. In addition, this document explains how to configure NIS clients. This document applies to AIX Versions 4.x.

Once you have planned your implementation of NIS, the first step is to configure the NIS master server. This server will serve out the information for your NIS domain, so it is important to ensure that its /etc/hosts, /etc/group, /etc/passwd, and other information you would like to share is valid before building your NIS master server and creating the NIS maps. Once you have configured your NIS master server, you may configure NIS clients that will bind to the master.

NOTE: You may have only one NIS master server per NIS domain.

Related documentation

The product documentation library can be accessed at the following URL:
http://www.rs6000.ibm.com/resource/aix_resource/Pubs/index.html

Additional information can be found in:
Managing NFS and NIS, published by O'Reilly


NIS master server configuration

Configuration on the master:

  1. Enter smitty yp.
  2. Select Network Information Service (NIS).
  3. Select Change NIS Domain name of this host.
  4. Enter the NIS domain name.
  5. Press the F3 key twice.
  6. Select Configure/Modify NIS.
  7. Select Configure this Host as a NIS Master Server (take defaults and add slaves if necessary).
  8. Press F10 to exit.
  9. Enter domainname to verify it is set correctly.
  10. Enter ypwhich to verify it is bound to itself.

Binding the master server

To bind the master or slave server to itself, and for subsequent reboots, complete the following steps:

  1. Enter stopsrc -s ypbind.
  2. Enter chssys -s ypbind -a '-ypsetme'.
  3. Enter startsrc -s ypbind. Wait approximately five seconds before continuing.
  4. Next, enter ypset 127.0.0.1. Again wait approximately five seconds before continuing.
  5. Enter ypwhich twice, if not bound the first attempt.
    ### should show bound OK to expected ipaddress
    ### ipaddresss of Server is OK also.
  6. Add the following 2 lines to /etc/rc.nfs. These lines must be added after the start ypbind command.
               sleep 10
               ypset 127.0.0.1
    

NIS client configuration

  1. Enter smitty yp.
  2. Select Network Information Services (NIS).
  3. Select Change NIS Domain Name of this Host (add NIS domain name).
  4. Press F3 twice.
  5. Select Configure/Modify NIS.
  6. Select Configure this Host as a NIS Client, take defaults and press Enter.
  7. Press F10 to exit.
  8. From the command line enter ypwhich ( twice if not bound the first time).

At this point, your client should be bound to your master, and you should be able to read the NIS maps with the ypcat command.

             #ypcat hosts
             #ypcat group

NIS slave configuration

NOTE: You will need to build an NIS slave for your different subnets so that the clients on your subnets will be able to ypbind. This is because routers do not pass broadcast requests. You will need to have the master NIS server IP address for reference, because you will have to first manually ypbind the machine to the NIS master if going across a router.

Be sure that the machine is configured as an NIS client before converting to a slave. Then complete the following procedure.

  1. Enter stopsrc -s ypbind.
  2. Enter chssys -s ypbind -a '-ypsetme'.
  3. Enter startsrc -s ypbind. Wait approximately five seconds before continuing.
  4. Enter ypset <NIS Master's IP Address>.
  5. Enter ypwhich to ensure the machine is now bound to the NIS master.
  6. Enter smitty yp.
  7. Select Network Information Services (NIS).
  8. Select Configure/Modify NIS.
  9. Select Configure this Host as a NIS Slave Server.
  10. Enter the name or IP address of the master NIS server for your domain, take defaults and hit enter.
  11. Press F10 to exit.

Binding the slave server

Following are the steps to bind the slave to itself, and for subsequent reboots. By this point, you will have already executed the chssys command for ypbind. Fewer steps are required than to bind an NIS master to itself.

  1. Enter ypset 127.0.0.1. Wait approximately five seconds before continuing.
  2. Enter ypwhich twice, if not bound the first attempt
    ### should show bound OK to expected ipaddress
    ### ipaddresss of Server is OK also.
  3. vi /etc/rc.nfs and add the following. These lines must be added after the start ypbind command.
                  sleep 10
                  ypset 127.0.0.1
    



    [ Doc Ref: 95375068821198     Publish Date: Oct. 02, 2000     4FAX Ref: 8600 ]