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

MySQL5.7 parallel replication principle and implementation

Anyone who has a little knowledge of data operati...

Detailed analysis of the syntax of Mysql update to modify multiple fields and

When updating a record in MySQL, the syntax is co...

Some suggestions for ensuring MySQL data security

Data is the core asset of an enterprise and one o...

Detailed explanation of JavaScript data types

Table of contents 1. Literals 1.1 Numeric literal...

How to bypass unknown field names in MySQL

Preface This article introduces the fifth questio...

How to configure MySQL master-slave replication under Windows

MySQL master-slave replication allows data from o...

How to install kibana tokenizer inside docker container

step: 1. Create a new docker-compose.yml file in ...

Implementation of services in docker accessing host services

Table of contents 1. Scenario 2. Solution 3. Conc...

Detailed explanation of the transition attribute of simple CSS animation

1. Understanding of transition attributes 1. The ...

Detailed explanation of monitoring NVIDIA GPU usage under Linux

When using TensorFlow for deep learning, insuffic...

Detailed explanation of .bash_profile file in Linux system

Table of contents 1. Environment variable $PATH: ...

Newbies quickly learn the steps to create website icons

<br />Original URL: http://www.lxdong.com/po...

JavaScript to achieve the effect of clicking on the submenu

This article shares the specific code of JavaScri...