About NIS Server

Source: Internet
Author: User

NIS (Network Information System) is designed to allow many computers on the Network to share a set of user data, a bit like MS Windows NT domain. NIS was first used by SUN Microsystems in its sun OS and later widely used on Various UNIX platforms. In the past, NIS were not called NIS, but YP (Yellow Pages). However, they were changed to NIS due to trademark issues. However, YP is often used. For example, we can see that many NIS commands are named as YP.
When there are multiple servers in our system, if each server has the same user setting, one way is to maintain the same setting for each server, when we want to add a new user or user to change the password, we must enter each machine for configuration. The other method is to use NIS. We only need to set one of them as the NIS Master Server and the other machines as the NIS Client. to modify the settings, we only need to modify the settings on the Master server.
NIS has the concept of "NIS domain". The Client can join an NIS Domain to use the account and password of this NIS domain for authentication. The following is an example of domain "twbsd.
NIS Server Settings
First, modify/etc/rc. conf and add the following settings:
Nisdomainname = "twbsd"
Nis_server_enable = "YES"
Nis_yppasswdd_enable = "YES"
Nis_yppasswdd_flags = "-t/etc/master. passwd"

Next, set/var/yp/Makefile. copy the dist to/var/yp/Makefile, modify/var/yp/Makefile, add the following line, and annotate the line NOPUSH = "True:
# NOPUSH = "True"
MASTER_PASSWD =/etc/master. passwd
Run the following commands:
# Ypinit-m twbsd
Creating an YP server will require that you answer a few questions.
Questions will all be asked at the beginning of the procedure.
Do you want this procedure to quit on non-fatal errors? [Y/n: n]
OK, please remember to go back and redo manually whatever fails.
If you don't, something might not work.
Can we destroy the existing/var/yp/twbsd and its contents? [Y/n: n] y
At this point, we have to construct a list of this domains YP servers.
Alexwang.com is already known as master server.
Please continue to add any slave servers, one per line. When you are
Done with the list, type.
Master server: alexwang.com
Next host to add: ^ D if there are other slave servers, add them again. Otherwise, press Ctrl + D.
The current list of NIS servers looks like this:
Alexwang.com

Restart NIS Server or execute the following commands to start NIS Server:
#/Etc/netstart
NIS Client settings
For the Client, edit/etc/rc. conf and add the following lines:
Nisdomainname = "twbsd"
Nis_client_enable = "YES"
Next, run vipw to modify/etc/master. passwd to remove non-system users and add the following line at the end of the file:
+ :::::::::
Next, edit/etc/group, remove non-system users, and add this line:
+ :*::
Next, you can use ypcat passwd to view the passwd map of the Server.
FreeBSD Handbook contains 10 parts of NIS. We recommend that you refer to this file for the most information.

  1. Configure the NIS server and client in RHEL 5
  2. How to configure an instance for NIS on RHEL
  3. RHEL5.1 Master/Slave NIS server configuration and Testing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.