Skip to contentSkip to conversation

Mount /home/* directories only with the right user

DISCUSSION Ricardo Pérez López 2 participants 2 messages Aug 2, 2010 – Sep 17, 2010 Kernel automounter

lore
Share & tools
lore
#0 lore raw

Hi. I'm an autofs newbie and I would like to ask you one question related with the automounting of /home/* directories.

I've an NFS server exporting /home, and I've configured autofs5 in the client computer in order to automount /home/* directories every time a user is logged in (user accounts are exported via LDAP, but that's another story).

When user (say) alice logs into the client computer, autofs exports her /home/alice, so it's right. However, if alice now do:
"cd /home/bob", then autofs exports /home/bob too. I don't want that. I wonder if there's a way to automount a /home/* directory ONLY if you're the right user, i.e. alice should only get /home/alice and bob should only get /home/bob.

(For another unrelated question, all the /home/* directories must have 777 permissions, so I'm trying to securize the access to the /home/* directories using automount.)

Thanks in advance,

Ricardo.

#1 lore raw
Quoted 6 lines · Ricardo Pérez López

When user (say) alice logs into the client computer, autofs exports her /home/alice, so it's right. However, if alice now do:
"cd /home/bob", then autofs exports /home/bob too. I don't want that. I wonder if there's a way to automount a /home/* directory ONLY if you're the right user, i.e. alice should only get /home/alice and bob should only get /home/bob.

And what should happen if both alice and bob are logged in? In that case, both directories would be auto-mounted, and nothing would prevent them to cd to the other's $HOME.

Quoted 3 lines

(For another unrelated question, all the /home/* directories must have 777 permissions, so I'm trying to securize the access to the /home/* directories using automount.)

It's not unrelated. I think it's crucial.
If you don't want A to look (&more) into B's stuff then set the permissions right.
If you need another user to have access to all of them, use a special group for that (with 77x permissions, then) which nobody else belongs to.

Sorry, but I can't see another solution (as long as you don't explain what the rationale behind 777 would be)

S

Signature · 4 lines
Steffen Grunewald * MPI Grav.Phys.(AEI) * Am Mühlenberg 1, D-14476 Potsdam
Cluster Admin * http://pandora.aei.mpg.de/merlin/ * http://www.aei.mpg.de/
* e-mail: steffen.grunewald(*)aei.mpg.de * +49-331-567-{fon:7233,fax:7298}
No Word/PPT mails - http://www.gnu.org/philosophy/no-word-attachments.html