Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-27-2004, 11:29 PM   #1
Senior Member
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 9.2
Posts: 1,181

Rep: Reputation: 51
NIS setup mixing server and client.

I am following available info from the net which all suggest the same process. When I get to the step running: "/usr/lib/yp/ypinit ", this doesn't work and I run "usr/lib/yp/ypinit -m" instead.

I have two RH9 boxes, one called 'master ' and the other called 'client'. This procedure automatically puts 'client' (which is the client host) on the list first and then ask to "add the names for the other hosts....."

The end result is a setup that doesn't work. I can't figure out why it's putting 'client' on the list, how can I make corrections?

The 2 boxes successfully communicate through NFS.

Any hint most appreciated.

Last edited by rblampain; 10-27-2004 at 11:30 PM.
Old 10-28-2004, 07:37 AM   #2
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Rep: Reputation: 30
The end result is a setup that doesn't work

What is say's any error messages or ...

Anyway lets have a look at this quick how to for u,

A quick NIS configuring how to

NIS server
1. nisdomainname <your system name>

2. confirm nisdomain name is set or not by issuing following command


3. /etc/init.d/portmap start

4. /etc/init.d/ypserv start

5. /usr/lib/yp/ypinit -m

6. /etc/rc.d/init.d/yppassdd start

7. /etc/sysconfig/network
NISDOMAIN=<your nis domain name specified at step 1>

NIS Client

1. nisdomainname <ur nisdomainname specied step 1 of NIS server config.>

2. vi /etc/yp.conf

ypserver <ip address of the nis server>

3./etc/init.d/ypbind start

Old 10-29-2004, 06:27 AM   #3
Senior Member
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 9.2
Posts: 1,181

Original Poster
Rep: Reputation: 51
Thank you Akshat for your very clear instructions.
No there was no error and there was nothing in the logs but I found one file had the wrong nisdomainname. I also found these parameters are volatile (cleared at reboot probably due to an incomplete setup) and I've included your instructions in bash scripts as follows.

# set up NFS on server
/etc/rc.d/init.d/nfs start
/usr/sbin/exportfs -ra

# set up NIS on server
/etc/init.d/portmap start
/usr/sbin/ypserv start
/usr/sbin/rpcinfo -u localhost ypserv
/usr/lib/yp/ypinit -m
/etc/rc.d/init.d/yppasswdd start

It seems to work on the server, here is the output of the script:

Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ] [ OK ]
Starting portmapper: [ OK ]
program 100004 version 1 ready and waiting
program 100004 version 2 ready and waiting

At this point, we have to construct a list of the hosts which will run NIS
servers. lt is in the list of NIS server hosts. Please continue 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: lt
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/
Running /var/yp/Makefile...
gmake[1]: Entering directory `/var/yp/'
Updating passwd.byname...
Updating passwd.byuid...
Updating group.byname...
Updating group.bygid...
Updating hosts.byname...
Updating hosts.byaddr...
Updating rpc.byname...
Updating rpc.bynumber...
Updating services.byname...
Updating services.byservicename...
Updating netid.byname...
Updating protocols.bynumber...
Updating protocols.byname...
Updating mail.aliases...
gmake[1]: Leaving directory `/var/yp/'

lt has been set up as a NIS master server.

Now you can run ypinit -s lt on all slave server.
Starting YP passwd service: [ OK ]

I can't test is on the client because the directories I want to access from the client are under "/home/'user'" and in the group "meeting" on the server ('user' here is some 20 directories and users) and i get the message:

"Your home directory is listed as /home/'user' but it does not appear to exist."

although I can see the directories from the client if I login as a user from another group.

I can access normally the other directories and files which are in another group
from their user login so it appears as a user or permission issue.

I'll update this post as soon as i got this user problem resolved.
The users/group files on the client were incomplete and this prevented logins.
Now everything is showing up the way it is expected to show. All the directories exported
from the server show and are accessible on the client but there is still one problem,
if I write a file from the server it doesn't show on the client and if I write a file on the client, it doesn't show on the server.

For example from "/home/dir01" on the server I typed "touch try", a "ls -la" showed "try" was there but from the client under "/mnt/home/dir01" "ls -la" didn't show "try" even after rebooting the 2 computers and vise-versa.
Any hint on what am I missing greatly appreciated.

Last edited by rblampain; 10-31-2004 at 10:55 AM.


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 Client/Server setup... mapping Home Directories trey85stang Linux - Networking 4 01-06-2011 05:29 AM
How to setup a solaris NIS client while with a Linux NIS server? ntcm Linux - Security 2 03-31-2004 12:43 PM
How to setup a solaris NIS client while with a Linux NIS server? ntcm Linux - Networking 1 03-31-2004 07:51 AM
How to setup a Solaris NIS client while with a Linux NIS server? ntcm Solaris / OpenSolaris 1 03-31-2004 06:10 AM
How to setup a Solaris NIS client while with a Linux NIS server? ntcm Linux - General 1 03-31-2004 06:10 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:57 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration