LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-29-2007, 11:48 AM   #1
badall
LQ Newbie
 
Registered: May 2007
Posts: 19

Rep: Reputation: 0
NIS server problem


I've configured nis server in my FC4 os.

But when I use to log in another pc running with RHEL4,
its giving following error,

Your home directory is listed as:
'/home/badal'
but it does not apper to exist. Do you wamt to log in with the (root0 directory?
It is unlikely anything will work you use a failsafe session.

Now if click on yes it seems nothing but coming back to the log in screen.
 
Old 05-29-2007, 12:49 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
NIS provides "tables" (hosts, passwd, group etc...) but doesn't provide "mounts".

That is to say that while you may have told NIS to recognize your user and your host you can not tell it to use the filesystem from the first host on the second one.

What DOES provide the mount from the first host to the second one is NFS. You'll need to export it from the first host (/etc/exports file) and mount it on the second host (/etc/fstab).

Alternatively you could create a directory of the same name on the second host. That would would be used when you logged in because it doesn't care what is in the directory - simply whether it exists.

man nfs
man nfsd
man exports
man exportfs
man fstab
 
Old 05-29-2007, 11:31 PM   #3
p_s_shah
Member
 
Registered: Mar 2005
Location: India
Distribution: RHEL 3/4, Solaris 8/9/10, Fedora 4/8, Redhat Linux 9
Posts: 237
Blog Entries: 1

Rep: Reputation: 34
Here are the steps to configure the NFS server in this scenario:
Code:
· Edit the /etc/exports file to allow NFS mounts of the /home directory with read/write access.
/home	                   192.168.1.0/255.255.255.0(rw,sync)

· Let NFS read the /etc/exports file for the new entry and make /home/nisuser available to the network with the exportfs command.
[root@LinuxServer tmp]# exportfs -a
[root@LinuxServer tmp]#

· Make sure the required NFS, NFS lock and Portmapper daemons are both running and configured to start after the next reboot.
[root@LinuxServer tmp]# chkconfig nfslock on
[root@LinuxServer tmp]# chkconfig nfs on
[root@LinuxServer tmp]# chkconfig portmap on
[root@LinuxServer tmp]# /etc/init.d/portmap start
Starting portmapper: [  OK  ]
[root@LinuxServer tmp]# /etc/init.d/nfslock start
Starting NFS statd: [  OK  ]
[root@LinuxServer tmp]# /etc/init.d/nfs start
Starting NFS services:  [  OK  ]
Starting NFS quotas: [  OK  ]
Starting NFS daemon: [  OK  ]
Starting NFS mountd: [  OK  ]
[root@LinuxServer tmp]#
You can also setup autofs on NIS client to automate mounting of /home dir.

Code:
Follow this procedure on each NIS client to mount user’s home directories:

· Edit your /etc/auto.master file to refer to file /etc/auto.home for mounting information whenever the /home directory is accessed. After five minutes, autofs will unmount the directory.
 [root@robopc1 tmp]# cat /etc/auto.master
/home      /etc/auto.home	 --timeout 600
 
· Edit file /etc/auto.home to do the NFS mount whenever the /home directory is accessed.
[root@robopc1 tmp]# cat /etc/auto.home
*	-fstype=nfs,nosuid,soft,intr,rsize=8192,wsize=8192	LinuxServer:/home/&

· Start autofs and make sure it will start after the next reboot with the chkconfig command.
[root@ robopc1 tmp]# chkconfig autofs on
[root@ robopc1 tmp]# /etc/init.d/autofs start
Starting automount: [  OK  ]
[root@ robopc1 tmp]#

Last edited by p_s_shah; 05-29-2007 at 11:32 PM.
 
  


Reply



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
SUSE 9 and 10 NIS clients with RedHat 8.0 NIS server not working fishsponge Linux - Networking 0 11-29-2005 07:43 AM
how to join NIS server (SUN machine) to Linux NIS server? KoRiR Linux - Networking 3 04-28-2004 01:19 PM
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 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 - Server

All times are GMT -5. The time now is 10:37 PM.

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