LinuxQuestions.org
Help answer threads with 0 replies.
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 01-26-2008, 11:21 PM   #1
extendedping
Member
 
Registered: Feb 2004
Posts: 210

Rep: Reputation: 30
autofs nfs mounting home directories question


ok this is on centos 5.1...what I am trying to do...I have 2 computers both running centos 5.1. 192.168.1.13 is the "server" and I have shared the home directory in the /etc/exports file with permission for everyone. 192.168.1.110 is the "client" and on this machine I have started autofs/nfs and put the following line in the /etc/auto.master

/home /etc/auto.home

and the following line in /etc/auto.home

" -rw,intr,soft 192.168.1.13:/home/&

ok so far...I created a user nfs user on the server (.13) and then from the client I su - nfsuser. I then do a df -hP and do see the nfs mount and can cd to the /home/nfsuser directory with no problem. so to that point I am ok.

but now I can't have local users (will not let me create a home directory for that user under /home EVEN WHEN THE AUTOMOUNT IS NOT IN USE AND TIMED OUT. so I say...how can I use autofs/nfs to mount the remote home directories from .13 to .110 but have them mount in a different spot...well I then created a /mnt/home directory on the client and changed both the /etc/auto.master file line to read

/mnt/home /etc/auto.home.

the auto.home still reads * -rw,intr,soft 192.168.1.13:/home/&.

by my (obviously flawed) logic I should now (after restarting nfs and autofs) be able so su - nfsuser...and see that remote directory mounted on /mnt/home. but the su - nfsuser fails and simply says "su cannot change to /home/nfsuser no such file or directory.

well first off why are home directories from the server not mounting on /mnt/home on the client? I kind of understand that su is expecting to see the dir on home...but I can't understand why the automounter is not mounting to /mnt/home.

anyway to make an already long story longer...I am studying for a linux test and suspect they will have automounter stuff on it for using it to mount remote dirs...I also suspect they will have you set up local users for other tasks such as sgid collaborative groups, etc...so I really would like to know how to mount remote directories and either be able to specify an alternate location for them so home can still be used for local user ... or at least I would like to know why I cannot create a local user with a home directory (I can create the user with useradd but it will not create a home directory) when there is no remote user home directory mounted on the local home directory of the client...thanks much in advance as I am sure I am probably missing an essential concept here...

Last edited by extendedping; 01-26-2008 at 11:23 PM.
 
Old 01-26-2008, 11:30 PM   #2
extendedping
Member
 
Registered: Feb 2004
Posts: 210

Original Poster
Rep: Reputation: 30
btw let me change that I bit...I CAN in fact create users in the local home directory...but I swear I could not before making this post...so the question then is how to mount directories in an alternate location...

ok scrap that...I went back again and tried to su again to a local user and it would not work...it su - to them but not to the /home directory only to /. i checked that the remote home was not mounted and even turned off the automounter. strange. now the only way I can see the local home dir users or so to one of them is to turn off the automounter and reboot...so this is strange me thinks...help....

Last edited by extendedping; 01-26-2008 at 11:59 PM.
 
Old 01-28-2008, 06:26 AM   #3
PDock
Member
 
Registered: Aug 2004
Distribution: Slack10 & curr. tried numerous
Posts: 189

Rep: Reputation: 36
Try reading this http://www.linuxquestions.org/questi...etwork-607346/
Pay attention to what happens when local users logon vs nis user logon.

pd
 
Old 01-30-2008, 03:02 PM   #4
extendedping
Member
 
Registered: Feb 2004
Posts: 210

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by PDock View Post
Try reading this http://www.linuxquestions.org/questi...etwork-607346/
Pay attention to what happens when local users logon vs nis user logon.

pd
thanks I am still confused. I am assuming you are referring to this part of the post:::

"sharing home directory
Perhaps pointing out the obvious but you will have five users doing nothing if your NIS server goes down.

Consider having the /home directory for each user on his own machine. Joe's box[1] would have a /etc/passwd[shadow] entry setting his home directory to /home/Joe. On your NIS server create users (same uid as you say you are doing) and assign their home under /home/users/ . Thus Joe on the NIS server would be /home/users/Joe with same info in the NIS server passwd file.

Now when Joe sits at his box: He logs in and passwd sets his home to /home/Joe.
when Joe sits at any other box: He logs in (thru the NIS server) and his home is set to /home/users/Joe

Last step is to use rsync to keep home directories on NIS server in sync with "sits at" boxes.

Just a concept you might want to explore
ppd"

----------------------------


ok I get that (I think) but here is what I do not understand. again I have set up the auto.master to reference the auto.home. the auto.home reads * 192.168.1.13:/home/&

I also reduced the timeout value to 30 seconds. Ok so...now when automounter is not on I can see the local users when I cd into /home. that makes sense. then with automounter on I su - nfsuser. this user is on the nis server at 192.168.1.13. works great and mounts to the local /home dir. so far so good. but I then exit out of that user and wait for the timeout...I do a df -hP to see that the nfs mount is gone....I then ls /home and there is nothing..no local user and no nis/nfs user (the before mentioned "nfsuser". so the fact that a cd or an ls into the /home dir does not show the local users tell me that something is still mounted on the /home directory...right? so I cd' into the /home and then I open another terminal and do a df -hP. well the 192.168.1.13 IS NOT shown...so that tells me nothing is mounted on /home. but I can't see the local users so something must be mounted on /home right? well I then turn off the automounter "service autofs stop". then I cd out of the /home and back into the /home directory...and you know what I see? I see the home directory of 1 of the 10 local users I have set up...that is bizzare...so I make sure that user is not logged on and they are not...what the heck...so I less the /etc/passwd just to make sure I am not crazy...and there are my other local users all with /home specified in the file. yet only one of them now show having a home directory. I then reboot (making sure to chkconfig autofs off and upon reboot my local users are there....... to this just makes no sense to me at all...

Last edited by extendedping; 01-30-2008 at 03:07 PM.
 
  


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
NFS + Autofs mounting issue vm_devadas Suse/Novell 2 12-21-2007 05:25 AM
linux noob's NFS question on mounting directories hyjalsoul Linux - Newbie 5 07-31-2007 02:49 PM
NIS, NFS, autofs and /home folder question ramram29 Linux - Networking 2 08-25-2006 08:26 PM
NFS Home directories for laptops IndustrialGeek Linux - Newbie 1 05-20-2004 09:27 AM
Mounting NFS filesystem fstab vs autofs rrich100 Linux - Networking 0 11-13-2003 01:38 PM


All times are GMT -5. The time now is 08:53 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration