Skip to main content

Configuring Network Information Service server and client on AIX

Uma Chandolu (uchandol@in.ibm.com), Software Engineer, IBM
Photo of Uma Chandolu
Uma 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. You can reach him at uchandol@in.ibm.com.
Puneet Mahajan (pmahajan@us.ibm.com), Software Engineer, IBM
Photo of Puneet Mahajan
Puneet 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.

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

Date:  27 Nov 2007
Level:  Intermediate
Activity:  4062 views
Comments:  

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

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


    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


    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


    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


Resources

Learn

Get products and technologies

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

Discuss

About the authors

Photo of Uma Chandolu

Uma 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. You can reach him at uchandol@in.ibm.com.

Photo of Puneet Mahajan

Puneet 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.

Comments



Trademarks  |  My developerWorks terms and conditions

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

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
author1-email=uchandol@in.ibm.com
author1-email-cc=
author2-email=pmahajan@us.ibm.com
author2-email-cc=

My developerWorks community

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Special offers