Professional Documents
Culture Documents
C U S T O M E R (https://access.redhat.com/)
P O R TA L
Environment
Red Hat Enterprise Linux 3, 4, 5, 6, 7
Issue
How do I configure a NIS server and client?
Resolution
This article will provide an example of the NIS configuration procedures. This will include which
packages are needed for a NIS server and client and the procedures for configuration of both server
and client.
ypserv
ypbind
portmap
yp-tools
It is possible to check whether the following packages are installed on the system using the
command rpm -q <package-name> , e.g.
If any of these packages are not installed they can be installed as discussed in the Deployment
guide.
1. The NIS domain needs to be added in /etc/sysconfig/network . Edit the file and add the
C U S T O M E R (https://access.redhat.com/)
following line to the
P Oend
R TAof
L the file:
NISDOMAIN=DOMAIN-NAME
Replacing DOMAIN-NAME with the actual domain name of the server, ensuring it is in capitals.
2. Execute the command below so that the domain name is set immediately without rebooting
system:
# ypdomainname DOMAIN-NAME
# ypdomainname
DOMAIN-NAME
4. The NIS Server also needs to be set up as a client. Edit the /etc/yp.conf file and add the
following line:
ypserver 127.0.0.1
For RHEL3, 4, 5:
For RHEL3, 4, 5:
https://access.redhat.com/solutions/7247 2/9
8/9/2019 How do I configure a NIS server and client? - Red Hat Customer Portal
O M E R (https://access.redhat.com/)
C U S Ton
# chkconfig portmap
P O R TA
# chkconfig yppasswdd on L
# chkconfig ypserv on
For RHEL6, 7:
# chkconfig rpcbind on
# chkconfig yppasswdd on
# chkconfig ypserv on
6. Next, edit /var/yp/Makefile to reflect the following (Don't merge the passwd file with the
shadow file):
MERGE_PASSWD=false
all: passwd group hosts rpc services netid protocols mail shadow
# /usr/lib/yp/ypinit -m
# /usr/lib64/yp/ypinit -m
# system-config-authentication
This lets you specify the NIS domain and the NIS server. Enter the domain name as the one
which is used previously and localhost as the NIS server.
https://access.redhat.com/solutions/7247 3/9
8/9/2019 How do I configure a NIS server and client? - Red Hat Customer Portal
# chkconfig ypbind on
# chkconfig ypxfrd on
# chkconfig yppasswdd on
The above steps complete the steps to configuring a master NIS Server.
1. http://www.linux-nis.org/nis-howto/HOWTO/setting_nis.html (http://www.linux-nis.org/nis-
howto/HOWTO/setting_nis.html)
2. Man pages for ypserv(8) and ypserv.conf(5)
Note: Port 111 needs to be made available on the server for clients to connect. Look for additional
articles in the knowledgebase for more information about securing a NIS Server.
ypbind
yp-tools
# system-config-authentication
https://access.redhat.com/solutions/7247 4/9
8/9/2019 How do I configure a NIS server and client? - Red Hat Customer Portal
This lets you specify the NIS domain and the NIS server. Enter the domain name as the one
C U S T O M E R (https://access.redhat.com/)
which is used previously
P O R TAand
L localhost as the NIS server.
Note: If you are not using DNS you will need to use the IP address when specifying the
nisserver.
# chkconfig ypbind on
# service ypbind start
The above procedure is a simple example of setting up an NIS Server and Client. More information
can be found at: http://www.linux-nis.org/ (http://www.linux-nis.org/)
# ypcat passwd
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions
that Red Hat engineers have created while supporting our customers. To give you the knowledge
you need the instant it becomes available, these articles may be presented in a raw and unedited
https://access.redhat.com/solutions/7247 5/9
8/9/2019 How do I configure a NIS server and client? - Red Hat Customer Portal
form.
C U S T O M E R (https://access.redhat.com/)
P O R TA L
ypbind cannot start with a failure of binding to NIS server in Red Hat Enterprise Linux 6
9 Comments
8 October 2010 1:58 AM (https://access.redhat.com/solutions/7247#comment-319963)
RS Rajesh Subrmaniam (/user/799213)
(/user/799213)
There are two things that did not work for me on a RedHat 5.5 (64Bit) installation
NEWBIE
The creation of the NIS database command
5 Points
/usr/lib/yp/ypinit -m
https://access.redhat.com/solutions/7247 6/9
8/9/2019 How do I configure a NIS server and client? - Red Hat Customer Portal
I had to use the System / Administation / Authorization to configure the NIS client.
≤ Reply (/Ajax_comments/Reply/7247/319963)
This started ypbind and ran chkconfig. I had previously put NISDOMAIN=your-domain
into /etc/sysconfig/network, so YMMV.
However, ypbind did not come up when I rebooted the system, even though chkconfig
said it should. service ypbind start worked fine. Thought I had an answer... I'm opening
a ticket instead. Sorry.
≤ Reply (/Ajax_comments/Reply/7247/336453)
https://access.redhat.com/solutions/7247 7/9
8/9/2019 How do I configure a NIS server and client? - Red Hat Customer Portal
≤ Reply (/Ajax_comments/Reply/7247/542213)
C U S T O M E R (https://access.redhat.com/)
P O R TA L
20 September 2013 5:15 PM (https://access.redhat.com/solutions/7247#comment-542523)
2979 # chkconfig: - 24 76
Points
# chkconfig: - 26 74
ypbind must be started after ypserv, so changing ypbind's default to 27 (or higher) is
necessary.
≤ Reply (/Ajax_comments/Reply/7247/542523)
≤ Reply (/Ajax_comments/Reply/7247/770893)
https://access.redhat.com/solutions/7247 8/9
8/9/2019 How do I configure a NIS server and client? - Red Hat Customer Portal
NEWBIE
Good information. A little confusing as the various red hat versions are mixed into a
C U S T O M E R (https://access.redhat.com/)
11 Points single page.
PO Better
R TA L would be separate pages for each RH release.
≤ Reply (/Ajax_comments/Reply/7247/1022091)
thanks
≤ Reply (/Ajax_comments/Reply/7247/1198681)
https://access.redhat.com/solutions/7247 9/9