I'm having a bit of grief trying to get home directories that are automounted from a CIFS share working. In auto.master I have added the line

/home/     /etc/auto.home

and in /etc/auto.home I have

* -fstype=cifs,rw,nounix,file_mode=0700,dir_mode=0700,multiuser,sec=krb5,user=${UID},cruid=${UID},gid=${GID},_netdev ://mysambashare/Users/&

However when a user first logs in and the home folder isn't already present then from looking at the debugging logs it appears as though the directory is first tried to be mounted by root. That of course fails (as they don't have the right krb5 credentials) and the user is logged into the machine without a home directory. If I wait about a minute then cd ~ the drive will appear and be totally fine.

I tried setting negative_timeout = 0 in /etc/autofs.conf but this doesn't seem to have had an impact.

I tried changing the auto.home file to be a script that would throw an error if the using trying to log on weren't correct but of course that still seems to need the timeout.

I'd love to hear any other options I have.

1 Answer 1


I came up with a solution that worked. Instead of using UID/GID entries I calculated them based on the name of the folder that was trying to be mounted. So auto.home was replaced with the bash script


echo "-fstype=cifs,rw,nounix,file_mode=0700,dir_mode=0700,multiuser,sec=krb5,user=$(id --user $1),cruid=$(id --user $1),gid=$(id --group $1),_netdev ://mysambashare/Users/&"

Edit: Actually I don't think this did solve it, it only appeared to because there was a krb5 ticket cached. When it's a completely new login this approach doesn't work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .