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
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.
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
Configuration on the master:
- Enter smitty yp.
- Select Network Information Service (NIS).
- Select Change NIS Domain name of this host.
- Enter the NIS domain name.
- Press the F3 key twice.
- Select Configure/Modify NIS.
- Select Configure this Host as a NIS Master Server
(take defaults and add slaves if necessary).
- Press F10 to exit.
- Enter domainname to verify it is set correctly.
- Enter ypwhich to verify it is bound to itself.
To bind the master or slave server to itself, and for
subsequent reboots, complete the following steps:
- Enter stopsrc -s ypbind.
- Enter chssys -s ypbind -a '-ypsetme'.
- Enter startsrc -s ypbind. Wait approximately five seconds before
continuing.
- Next, enter ypset 127.0.0.1. Again wait approximately five seconds
before continuing.
- Enter ypwhich twice, if not bound the first attempt.
### should show bound OK to expected ipaddress
### ipaddresss of Server is OK also.
- 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
- Enter smitty yp.
- Select Network Information Services (NIS).
- Select Change NIS Domain Name of this Host (add NIS domain name).
- Press F3 twice.
- Select Configure/Modify NIS.
- Select Configure this Host as a NIS Client, take defaults and press Enter.
- Press F10 to exit.
- 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
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.
- Enter stopsrc -s ypbind.
- Enter chssys -s ypbind -a '-ypsetme'.
- Enter startsrc -s ypbind. Wait approximately five seconds before continuing.
- Enter ypset <NIS Master's IP Address>.
- Enter ypwhich to ensure the machine is now bound to the NIS master.
- Enter smitty yp.
- Select Network Information Services (NIS).
- Select Configure/Modify NIS.
- Select Configure this Host as a NIS Slave Server.
- Enter the name or IP address of the master NIS server for your domain, take defaults and
hit enter.
- Press F10 to exit.
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.
- Enter ypset 127.0.0.1. Wait approximately five seconds before continuing.
- Enter ypwhich twice, if not bound the first attempt
### should show bound OK to expected ipaddress
### ipaddresss of Server is OK also.
- 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 ]