I have configured autofs on CentOS using
/etc/auto.mymount. Something like this:
mymount -fstype=cifs,rw,noperm,credentials=/etc/auto.creds.svc_account ://winserver.domain.local/SharedFolder
This has been working and still does for some mounts. However a password has been changed for an account which is used for connecting to a Windows server and this now contains all sorts of special characters. My credentials file
/etc/auto.creds.svc_account looks a bit like this:
Obviously I have changed the password above, but it does contain various non alpha-numeric characters that are in the real password.
Looking in /var/log/messages, I see the following:
Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE CIFS VFS: Send error in SessSetup = -13 CIFS VFS: cifs_mount failed w/return code = -13
Given that the only thing which has changed is the password, I'm guessing that that there are special characters in there which need to be escaped somehow.
Now I know that if I put that password into the command line, then commands will fall over due to the various special characters, which can be dealt with by preceding each of them with a backslash. For instance:
But that didn't work, so clearly I'm missing something. Is anybody able to explain which characters need to be escaped in a credentials file and the correct way to escape them?