Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Redhat 4/5

I'm trying to centralize home directories for my users. We're not at the point to implement ldap just yet, but let's say I want all my users' home directories mounted off an NFS server. I got it all working, autofs that is, but I have one minor problem.

If Sally logs in, her home directory is mounted under /export/sally. If she runs ls /export/sam it'll "mount" /export/sam, but she can't read or write to it. It still shows up as a mount point if she runs df -h because she attempted to mount it via autofs. Is there a way to restrict this?

/etc/auto.master

/export /etc/auto.export

/etc/auto.export

*       -fstype=nfs,rw,nosuid,soft nfsserver:/export/&
share|improve this question

1 Answer 1

up vote 0 down vote accepted

There is no way to restrict this, because of a few reasons:

  1. It is possible for Sam to have a folder/file that Sally has permissions to access, so Sally accessing Sam's $HOME is not necessarilly an incorrect action.
  2. The system doesn't know what the permissions on the files in the mount are, until the NFS share is mounted.

You could try something like:

$USER servername:path/to/exports/home/&

However, if Sam were logged in while Sally was logged in, Sally would still see /auto/sam.

share|improve this answer
    
ah ok, i noticed on our system, /export/home/sam is mapped as my /home directory (I ran pwd). However, if I list the parition, it doesn't show up. How is that accomplish? –  luckytaxi Mar 10 '11 at 14:09
    
I'm not sure I understand. If you want to list all mounted volumes, the mount command does that. –  JeffG Mar 10 '11 at 14:27
    
I'll have to speak w/ the sysadmin who runs the production server but I noticed when I logged into their boxes, my home directory is mounted as /export/home/sam. If I run df -h I see the normal partitions (/,/tmp,/home, etc...), but no mention of /export/... –  luckytaxi Mar 10 '11 at 14:45
    
Probably because that 'partition' isn't an actual parition on the system you are running DF on. Try cat /proc/mounts –  JeffG Mar 10 '11 at 14:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.