Configuring Network Information Service server and client on AIX

Security and user and group management are important aspects with respect to any operating system. In distributed networks, one of the most important tasks is to maintain the user and group information. For centralized management, many customers use Network Information Service (NIS). This article provides an overview of NIS and the steps to install and configure NIS as a server and client.

Uma Chandolu (uchandol@in.ibm.com), Software Engineer, IBM

Photo of Uma ChandoluUma M. Chandolu works as a Development Support Specialist on AIX. He is currently the team lead of the AIX Security Development Support team at IBM Bangalore.He has three years of extensive hands-on experience in AIX environments, and demonstrated expertise in AIX system administration and other subsystems. He has experience interfacing with customers and handling customer-critical situations. He has been recognized as an IBM developerWorks Contributing Author. You can reach him at uchandol@in.ibm.com.



Puneet Mahajan (pmahajan@us.ibm.com), Software Engineer, IBM

Photo of Puneet MahajanPuneet Mahajan is an advanced AIX technical support specialist with over seven years of experience in AIX system administration. He is currently the team lead of AIX remote support for Independent Software Vendors (ISV) at IBM Austin. You can reach him at pmahajan@us.ibm.com.



27 November 2007

Also available in Chinese Russian

Introduction

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

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

    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

    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

    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

Resources

Learn

Get products and technologies

  • IBM® trial software: Build your next development project with software for download directly from developerWorks.

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into AIX and Unix on developerWorks


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