Configuring Network Information Service server and client on AIX
Network Information Service (NIS), originally known as Yellow Pages, is sometimes called Name Services and follows the client-server architecture. NIS servers maintain replicated servers, with the principal servers being referred to as master servers and the replicated servers referred to as replica or slave servers.
NIS master and replica servers provide services to NIS clients. NIS stores information on the master server in a set of files called maps about users, groups, hosts information, address, and network services information. This collection of network information is referred to as the NIS namespace.
NIS maps store information in a two column table. The first column lists the key and the other column displays information about the key. The NIS server responds to the client query based on the information in the maps.
Figure 1. NIM server
Make sure that the NIS server fileset,
bos.net.nis.server, and the NIS client fileset,
bos.net.nis.client , are installed on the system before
configuring the NIS server and client.
NIS is a part of the Network File System (NFS) software package that includes commands and daemons for NFS, NIS, and other services. NFS and NIS are independent of each other.
To configure NIS, you need to:
- Create a NIS domain.
The NIS domain is a collection of systems that are logically grouped together. All the systems in the group share the same set of NIS maps that belong to the same domain.
Using the System Management Interface Tool (SMIT) tool, run the following command:
# smitty chypdom
Figure 2. Change the NIS domain name of host
Here "NIS" is the domain name of the host. This domain is configured immediately to the host, and it will also be affected after reboot.
To verify it, run the following command:
- To configure the NIS server (Master/Principal server), run the following
command to see if the NIS master fileset is installed:
# lslpp –l bos.net.nis.server
If the master fileset is not installed, you will need to install it before continuing.
Using the SMIT tool, run the following command:
# smitty mkmaster
Figure 3. Configuring a host as an NIS master server
Here the "NISreplica.ibm.com" server works as the replica/slave server for the master server. If you want to provide privilege to the users to change their passwords from NIS clients, then you need to initialize the yppasswd and ypupdated daemons.
Once the NIS server is configured, it will start the ypserv daemon.
# ps -eaf |grep yp root 733398 212996 0 Jun 11 - 0:20 /usr/lib/netsvc/yp/ypbind -ypsetme root 778446 733398 0 21:50:38 - 0:00 /usr/lib/netsvc/yp/ypbind -ypsetme root 802956 212996 0 Jun 11 - 0:31 /usr/lib/netsvc/yp/ypserv
To stop the NIS server daemon, run the following command:
# stopsrc –s ypserv
Make sure that no NIS clients are configured to this NIS server before stopping the NIS server daemon.
- Configure the NIS client.
Make sure the NIS server and NIS clients are in the same network. Once the server is identified, configure the NIS domain name the same as the NIS server domain name. Follow the above steps to configure the NIS domain. Once the domain is configured, then do the following to configure the NIS client.
Using smit tool, run the following command:
Figure 4. Configuring a host as an NIS client
Provide the NIS server name so that it configures the NIS client corresponding to the NIS server. In this example, znim.austin.ibm.com is the name of the NIS server, which you configured.
Once the NIS client is configured, it starts the ypbind daemon.
# ps -eaf | grep yp root 258214 118932 0 02:44:48 - 0:00 /usr/lib/netsvc/yp/ypbind -ypsetme
To verify the NIS client server configuration, type:
# lsuser -R NIS ALL
All the user’s information is displayed.
To stop NIS Client daemon, type:
# stopsrc –s ypbind
How to update the user’s information to the maps?
If any information is changed on the NIS server (either creating or deleting user or group information or changing the passwords for the users) and to reflect that information on the NIS clients, you need to update the maps have with the latest information.
To update the maps, run the following command using the SMIT tool on the NIS master server:
# smitty mkmaps
Figure 5. Build and rebuild NIS Maps for master server
- The Network Information Service (NIS and NIS + concepts ) section of the Communications Programming Concepts manual provides technical reference sources for programming NIS and NIS+.
- Get more information on NIS from the Network Information Service Guide.
- Installing with Network Installation Management: Get more NIM information here.
- AIX® and UNIX®: The AIX and UNIX developerWorks zone provides a wealth of information relating to all aspects of AIX systems administration and expanding your UNIX skills.
- Search the AIX and UNIX library by topic:
- IBM® trial software: Build your next development project with software for download directly from developerWorks.