惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

雷峰网
雷峰网
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Tailwind CSS Blog
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
Jina AI
Jina AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
Netflix TechBlog - Medium
B
Blog RSS Feed
Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
The Blog of Author Tim Ferriss
D
Docker
博客园 - 聂微东
博客园 - 【当耐特】
博客园 - 三生石上(FineUI控件)
L
LangChain Blog
量子位
宝玉的分享
宝玉的分享
博客园 - 司徒正美
The Cloudflare Blog
G
Google Developers Blog
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC

博客园 - Eric Yih

Should be run run adprep when you want to install a higher version of windows controller in an existing forest lsattr command in AIX Consolidate Unix/Linux commands 资料收集 How to block SMB/LDAP/KDC/KPASSWD/NTP ports via firewall svchost.exe占用CPU 100%的解决方法 CVS使用手册 How to: Add a user from the OS X command line, works with Leopard In Mac OS X, how do I create and delete users? Sendmail How to config the AFP Share Server on Mac OS X 10.4/10.5 Server - Eric Yih How to switch 32<->64bit kernel on AIX Dpkg 常用指令操作快速参考 How to create local user use command dscl in Mac 通过 SSH 密钥验证实现在不同系统之间的脚本自动化 How-to: Understanding Mac OS X Open Directory Hands on: Mac OS X Server Mail Service Boot Camp, Part 1: The Basics Hands on: Setting up Mac OS X Open Directory Hands on: Using Apple's Workgroup Manager
Configuring Network Information Service server and client...
Eric Yih · 2009-07-20 · via 博客园 - Eric Yih

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:

    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:

  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:

    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:

    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:

    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:

    All the user’s information is displayed.

    To stop NIS Client daemon, type:

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: