LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   auto mount to nfs home dir when user login to nis client (http://www.linuxquestions.org/questions/linux-newbie-8/auto-mount-to-nfs-home-dir-when-user-login-to-nis-client-707603/)

lijianatusa 02-25-2009 10:14 PM

auto mount to nfs home dir when user login to nis client
 
Hello everyone:

Here we go...

1. nis server for authentication
2. nfs server for each user's home dir

Let me put it this way, nisuser1 logon to nisclient*, using the nis server for authentication, if authenticated, the nisclient* will auto mount the nisuser1's home dir from the nfs server. When nisuser1 logout, his home dir will be unmounted automatically. (where nisclient* means any of nisclient machines)

I think I already got the nis part, but for the nfs part, don't know how.
Any suggestion will be really appreciated.

BTW, the nis and nfs servers are both ubuntu 8.10, nisclients are mixed, most of them are FC and RH.

Thank you in advance, I really really need help~~~~~:confused:

frieza 02-25-2009 10:23 PM

if you can already log in using nis credentials
and mount the /home directory using nfs

add a line in /etc/fstab

server_ip:/home /home nfs defaults 0 0

this will mount /home from the nfs server at boot

if you havn't created the nfs share yet then on the server add an entry to the file /etc/exports
/home (rw,no_root_squash,sync) (or root_squash instead of no_root_squash if you want to deny user root from mounting the nfs)
then make sure the nfs server starts when the server starts

billymayday 02-25-2009 10:24 PM

What have you tried for the automount side?

Have a look at http://www.linuxhomenetworking.com/w...FS_Automounter and see if that helps, then come back with any specific issues you may have

lijianatusa 02-25-2009 11:34 PM

Quote:

Originally Posted by frieza (Post 3457691)
if you can already log in using nis credentials
and mount the /home directory using nfs

add a line in /etc/fstab

server_ip:/home /home nfs defaults 0 0

this will mount /home from the nfs server at boot

Thank you very much for your quick reply, I haven't started the nfs part yet, but are you saying the /home dir will be mounted on the client machine when the client boots up?? Is there a way that the user's home dir will be mounted when the nis user logged in to the client??

Thank you very much.

lijianatusa 02-25-2009 11:38 PM

Quote:

Originally Posted by billymayday (Post 3457692)
What have you tried for the automount side?

Have a look at http://www.linuxhomenetworking.com/w...FS_Automounter and see if that helps, then come back with any specific issues you may have

Hello billymayday:
Thank you very much for your quick reply, I will have a look at the link you give me, I haven't started the nfs part yet, but wondering for my case, is this possible to implement? Basicly I will to mount each single user's home dir (/home/user) for each nisuser, don't know whether I can do that at all??

Thank you very much.
I will get back with questions very soon.....


All times are GMT -5. The time now is 06:54 PM.