Detailed process of configuring NIS in Centos7

Detailed process of configuring NIS in Centos7

principle

NIS (Network Information Service)
In an environment with multiple Linux servers, and one Linux server has many accounts that may be the same, it is difficult for administrators to manage. The main function of NIS is to provide centralized management of system information such as the host account system.
When the NIS client needs to verify user login information, it sends a query request to the NIS server. When an NIS server in the system provides services to multiple NIS clients, any NIS client in the system will be authenticated by the NIS server, thus realizing the centralized management of user accounts.

Network environment preparation

name IP address Host Name
NIS Server 13.10.29.2 node292
NIS Client 13.10.29.3 node293

Pre-installation preparation

1. Stop the firewall

systemctl stop firewalld

2. Disable firewall startup

systemctl disable firewalld.service

2. Modify selinux

vi /etc/selinux/config

Change SELINUX=enforcing to: SELINUX=disabled
, and execute setenforce 0 to make it take effect immediately. Of course, you can also restart the machine

NIS Server Operations

1. Install the software package

yum -y install ypserv ypbind yp-tools rpcbind

2. Set NIS network name

vi /etc/sysconfig/network

Add a line NISDOMAIN=nisdomain to specify the domain name of the NIS server as nisdomain

3. Add automatic joining of NIS domain at startup

vi /etc/rc.d/rc.local

Add a line /bin/nisdomainname nisdomain in it

Note~~ You can use nisdomainname to view directly. If you find that the set domain name is not displayed, enter nisdomainname nisdomain again

4. Create domain users (groups)

useradd -s /bin/bash nisuser

And set the user password

passwd nisuser

Create a User Group

groupadd nisgroup

5. Set up permissions for main configuration files

vi /etc/ypserv.conf

Add the following three lines to restrict the servers that can only join the 13.10 network segment

insert image description here

6. Add NIS client information in the NIS domain server

vi /etc/hosts

Add the following two lines in it:
13.10.29.2 node292
13.10.29.3 node293

7. Start NIS service

systemctl start rpcbind
systemctl start yppasswdd
systemctl start ypserv

8. Initialize the database

/usr/lib64/yp/ypinit -m

Then execute "ctrl+D" and enter y

Note: If you change the NIS server configuration file during this period, you need to reinitialize the database.

9. After initializing the database, you need to restart the service

systemctl start rpcbind    
systemctl start yppasswdd 
systemctl start ypserv

10. Set the service to start automatically at boot

systemctl enable rpcbind
systemctl enable yppasswdd
systemctl enable ypserv

NIS Client Operations

1. Install the software package

yum -y install ypbind yp-tools rpcbind

2. Add NIS domain to the network

vi /etc/sysconfig/network

Add a line NISDOMAIN=nisdomain

3. Set the system to automatically join the NIS domain at startup

vi /etc/rc.d/rc.local

Add /bin/nisdomainname nisdomain

Also note that you can use nisdomainname to view it directly. If you find that the set domain name is not displayed, enter nisdomainname nisdomain again.

4. Add NIS server information in the NIS client

vi /etc/hosts

13.10.29.3 node293
13.10.29.2 node292

5. To configure NIS using the graphical interface, enter:

authconfig-tui 

insert image description here

insert image description here

6. Start the service

systemctl start rpcbind
systemctl start ypbind

At this point, you can verify whether the deployment is successful by entering yptest on the client. If you can see the user on the nis server, congratulations, the deployment is successful.

The above NIS environment has been deployed! !

This is the end of this article about the detailed process of configuring NIS in Centos7. For more relevant content about configuring NIS in Centos7, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed steps for setting up and configuring nis domain services on Centos8

<<:  Detailed process record of Vue2 initiating requests using Axios

>>:  HTML data submission post_PowerNode Java Academy

Recommend

Vue3.0 handwritten carousel effect

This article shares the specific code of Vue3.0 h...

MySQL 8.0.18 installation tutorial under Windows (illustration)

Download Download address: https://dev.mysql.com/...

Why not use UTF-8 encoding in MySQL?

MySQL UTF-8 encoding MySQL has supported UTF-8 si...

HTML+CSS to create heartbeat special effects

Today we are going to create a simple heartbeat e...

Discussion on the problem of garbled characters in iframe page parameters

I encountered a very unusual parameter garbled pro...

Detailed installation and use of virtuoso database under Linux system

I've been researching some things about linke...

html page!--[if IE]...![endif]--Detailed introduction to usage

Copy code The code is as follows: <!--[if IE]&...

Several methods of implementing carousel images in JS

Carousel The main idea is: In the large container...

Advertising skills in the Baidu Union environment (graphic tutorial)

Recently, students from the User Experience Team o...

More elegant processing of dates in JavaScript based on Day.js

Table of contents Why use day.js Moment.js Day.js...

Detailed explanation of the use of default in MySQL

NULL and NOT NULL modifiers, DEFAULT modifier, AU...

HTML table markup tutorial (10): cell padding attribute CELLPADDING

Cell padding is the distance between the cell con...

Vue3+el-table realizes row and column conversion

Table of contents Row-Column Conversion Analyze t...

Use of Linux passwd command

1. Command Introduction The passwd command is use...