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'm having some trouble mounting a network share using autofs. I have added the following line to /etc/auto.master:

/mnt/mountpoint       /etc/auto.servername

I then created the file /etc/auto.servername with the following contents:

server-ip -fstype=cifs,rw,noperm,user=DOMAIN\username,pass=password ://server-ip/share

I then run service autofs restart and ls /mnt/mountpoint to determine whether autofs succeeds in mounting the share (it does not.) The result from dmesg is:

CIFS VFS: Send error in SessSetup = -13
CIFS VFS: cifs_mount failed w/ return code = -13
Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE

However, if I simply run mount -t cifs //server-ip/share /mnt/mountpoint -o user=username and enter the password on prompt, the share is mounted without any problems. I have verified the correct password is /etc/auto.servername.

Any ideas what I'm doing wrong? Thanks!

share|improve this question


server-ip -fstype=cifs,rw,noperm,user=DOMAIN\username,pass=password ://server-ip/share


share -fstype=cifs,rw,noperm,user=username,pass=password,domain=domain ://server-ip/share

share|improve this answer
That's what's done it for me. mount was not appreciating the domain\user backslash. Using the domain as another parameter worked just fine – JSancho Mar 31 '13 at 10:18

I would guess that maybe you aren't escaping your credentials correctly in the file. The \ in the username may be breaking things. I use a credentials file, I believe it is much safer.

This are the files I use to auto-mount a particular share.


/.autofs/cifssrvername /etc/auto.cifssrvername --timeout=600


share   -fstype=cifs,credentials=/etc/samba/.smbauth/smb.authfile.cifssrvername,uid=0,gid=0,file_mode=0664,dir_mode=0775 ://cifssrvername/share

I store my credentials in a separate file so I can set better permissions (0400).



The filesystem is then visible in /.autofs/cifssrvername/share.

share|improve this answer
I am using method 3 of the CentOS wiki at , which says that "/etc/auto.mymount can be made world-unreadable, so, use of the credentials file is not as important." I have also tried using just the username without DOMAIN\, with the same result, so I don't believe that is the cause. However, I will try your settings soon (and accept the answer if it works.) – robjb Apr 20 '11 at 1:22
This didn't solve my issues, although it seems that auto.master isn't being used (I now believe the CIFS VFS errors were from previous failed attempts using fstab.) However, I was able to get it working with /etc/fstab and a separate credentials file. – robjb Apr 21 '11 at 18:49

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.