Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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]#
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.