Contents


Configuring Network Information Service server and client on AIX

Comments

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
NIM server
NIM server

NIS installation

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.

NIS configuration

To configure NIS, you need to:

  1. 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
    Change the NIS domain name of host
    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:

    # domainname
  2. 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
    Configuring a host as an NIS master server
    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.

  3. 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:

    #smitty mkclient
    Figure 4. Configuring a host as an NIS client
    Configuring a host as an NIS client
    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
Build and rebuild NIS Maps for master server
Build and rebuild NIS Maps for master server

Downloadable resources


Related topics


Comments

Sign in or register to add and subscribe to comments.

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=AIX and UNIX
ArticleID=271419
ArticleTitle=Configuring Network Information Service server and client on AIX
publish-date=11272007