LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


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

Rep: Reputation: 52
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
LinuxRam
Member
 
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Rep: Reputation: 30
Quote:
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

nisdomainname

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


-Akshat
 
Old 10-29-2004, 06:27 AM   #3
rblampain
Senior Member
 
Registered: Aug 2004
Location: Western Australia
Distribution: Debian 11
Posts: 1,300

Original Poster
Rep: Reputation: 52
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
#!/bin/bash
/etc/rc.d/init.d/nfs start
/usr/sbin/exportfs -ra
/usr/sbin/rpc.mountd
/usr/sbin/rpc.nfsd
/sbin/rpc.statd
/sbin/rpc.lockd
/usr/sbin/rpc.rquotad

# set up NIS on server
nisdomainname nobla.org
nisdomainname
/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 ]
nobla.org [ 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:

lt

Is this correct? [y/n: y] y
We need a few minutes to build the databases...
Building /var/yp/nobla.org/ypservers...
Running /var/yp/Makefile...
gmake[1]: Entering directory `/var/yp/nobla.org'
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/nobla.org'

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.
------------------------------------------------------------------------------------------------------------------------
continued......
===========
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.
 
  


Reply


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

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:39 AM.

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