I'm having trouble mounting a share on my XenServer (5.6 FP1). From the command line I try:

mount.cifs //server/share /mnt/share -o credentials=credfile

The contents of credfile is:

username=Administrator
password=What@zR\!p3s

When I run the above mount command I get "Access Denied". However if I run the following command it works:

mount.cifs //server/share /mnt/share -o username=Administrator,password=What@zR\!p3s

Please note the "\" is to escape the bang and I've tried this with and without it in the credentials file. Any suggestions?

link|improve this question

67% accept rate
feedback

3 Answers

Try quoting it.

I.e.,

password="What@zR!p3s"

And I hope that's not really your password. If it is, you now need to change it.

link|improve this answer
No that is not a real password. Second, I've already tried both suggestions with same result. Have also tried literal quotes, ie. >> ' – David George Sep 8 '11 at 16:01
feedback

Have you tried removing the slash? completely? I don't believe the credentials file should need to be escaped at all. It needs to be escaped on the shell because the shell is interpreting the characters, not the mount.cifs command.

link|improve this answer
Yes, I've also tried it without the backslash in the credentials file. And I still get the access denied error. – David George Sep 9 '11 at 14:14
feedback

Another thing to try is to type the special character twice... I had a password with a $ in it, and had to replace it with $$. However, I'm currently having issues with the carrot: '^'

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.