Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a workstation, on which I have a local user account with a local home directory. I'm also a part of an organization, in which I have a NIS user/home directory. I would like to setup autofs in order to access some shared NFS directories.

The problem is, that after I do that, it automounts over my local home directory when I try to access it, which is not desirable for me.

Is there a way to prevent autofs from mounting to this mountpoint?

In a more general manner, is there a way to prevent autofs from mounting over existing directories?


share|improve this question
up vote 0 down vote accepted

You may be able to add something like

foo      /-

to /etc/auto_home to prevent /home/foo from being mounted over the network. Make sure it comes before the +auto_home line (which asks Directory Services for mappings), so it will take precedence.

If that doesn't work, the only way to do it is to move your actual home directory somewhere else (by convention, /export/home) and configure auto_home to "mount" it from there.

share|improve this answer
It worked. I didn't have a auto.home/auto_home. so I just put your suggestion in auto.master before +auto.master. I still wonder if there's a general way to prevent autofs from mounting over existing local directories though. Thanks! – Nir Mar 9 '11 at 13:39
No; the intended use is that you give autofs control of entire directories, and some implementations will hide any existing local directories when the autofs is mounted. That's why the /export/home convention I mentioned exists. – geekosaur Mar 9 '11 at 18:50
I see. Well, I'll remember that next time. Thanks a million. You saved me a lot of time :) – Nir Mar 10 '11 at 7:42

Your Answer


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.