Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 01-19-2010, 09:35 AM   #1
LQ Newbie
Registered: Jan 2010
Posts: 4

Rep: Reputation: 0
Unable to setup a NIS server setup on CentOS system


We are trying to set up a NIS server on a CentOS system. We need to have a NIS server which can provide NIS authentication to a couple of clients. We are practically new to all this stuff.

Just googled to find some ideas about installing ypserv and ypbind and portmapper. We did all that and also started them successfully. But now the clients are not able to join to the NIS domain . The error log states "YP_DOMAIN NOT BOUND".

I guess we have not entered the /etc/yp.conf, /etc/hosts files properly. Please let us know the detailed steps to setup a NIS server . Also, please let us know what entries should go into the different /etc/<file_names>? What is meant by HOSTNAME in the /etc/hosts file?

Is there any other files which need to be changed? Are we missing any steps?

Also to add-on, while executing the ypinit command we faced the following error:

root@localhost yp]# ./ypinit -m

At this point, we have to construct a list of the hosts which will run NIS
servers. localhost.localdomain is in the list of NIS server hosts. Please cont inue to add
the names for the other hosts, one per line. When you are done with the
list, type a <control D>.
next host to add: localhost.localdomain
next host to add:
The current list of NIS servers looks like this:


Is this correct? [y/n: y] y
We need a few minutes to build the databases...
Building /var/yp/domain/ypservers...
Running /var/yp/Makefile...
gmake[1]: Entering directory `/var/yp/domain'
gmake[1]: *** No rule to make target `all'. Stop.
gmake[1]: Leaving directory `/var/yp/domain'
make: *** [target] Error 2
Error running Makefile.
Please try it by hand.

Last edited by swatidas11; 01-19-2010 at 09:39 AM.
Old 01-19-2010, 10:29 AM   #2
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
Have you considered setting up an LDAP environment instead? It is more secure than NIS and in my opinion easier to setup/maintain.
Old 01-19-2010, 10:58 AM   #3
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 679Reputation: 679Reputation: 679Reputation: 679Reputation: 679Reputation: 679
I must admit I don't have any experience with NIS and am resorting to a old Fedora Core 5 book. The localhost.localdomain may cause problems if that name is used on the clients. Try the real hostname and domain name. Make sure your server has a hostname. Some new installations have localhost.localdomain as the hostname. You are supposed to change that. This is done so you don't install several computers with a default hostname.


If it doesn't return anything run
sudo domainname <yournisdomainname>

Then edit /etc/sysconfig/network and add the line:

This line will be needed in each NIS server and client.

Edit the Makefile to modify any setting you need. There should be a line like:
all: passwd group hosts rpc sevices netid protocols mail \
# netgrp shadow publickey ...
Old 01-19-2010, 08:01 PM   #4
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 17,818

Rep: Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558Reputation: 2558
There's a good HOWTO here


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
NIS server setup eranb2 Linux - Networking 0 01-31-2005 09:48 AM
How to setup a solaris NIS client while with a Linux NIS server? ntcm Linux - Security 2 03-31-2004 01:43 PM
How to setup a solaris NIS client while with a Linux NIS server? ntcm Linux - Networking 1 03-31-2004 08:51 AM
How to setup a Solaris NIS client while with a Linux NIS server? ntcm Solaris / OpenSolaris 1 03-31-2004 07:10 AM
How to setup a Solaris NIS client while with a Linux NIS server? ntcm Linux - General 1 03-31-2004 07:10 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:20 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration