Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 am struggling to mount a windows 2008 share on a CentOS 6.4 (64 bits) server

when I use smbclient it works:

smbclient  //esb.local/dfs -U ESBSertal -W ESB -P MyPassword

but with mount it does not. I tried on the command line:

mount.cifs //esb.local/dfs -o username=ESBSertal,password=MyPassword,domain=ESB /mnt/win

and adding a line to /etc/fstab

//esb.local/dfs /mnt/win cifs username=ESBSertal,password=MyPassword,domain=ESB 0 0

in both cases I get the same error:

mount.cifs //esb.local/dfs -o username=ESBSertal,password=MyPassword,domain=ESB /mnt/win
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

and for fstab

mount -a
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

I am grateful for your support.

just an update: this is executed as root. neither as root nor sudo work


share|improve this question
What kernel version you are using on CentOS ? – Abhishek Anand Amralkar May 17 '13 at 10:47
here ist the full output from cat /etc/*release* CentOS release 6.4 (Final) LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphi‌​cs-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch cat: /etc/lsb-release.d: Is a directory CentOS release 6.4 (Final) CentOS release 6.4 (Final) cpe:/o:centos:linux:6:GA – Dr Gorb May 17 '13 at 10:49
There isn't a , or some other whitespace in your password is there ? – Iain May 17 '13 at 10:53

sorry for not asking in a comment, but my rep is not high enough.

Do you have a PDC running on the Windows 2008 server? If so you probably missing just the domain for the user

 mount.cifs -o user=USER,dom=DOMAIN,password=MYPASS //pdc.domain/test /mnt

Have you tried to mount as administrator? If this works, then it's probably only a problem with the share permissions.

Otherwise check the syslog file, it should give you more informations about the error. Possible that the server requires packet signing and your request is without.

share|improve this answer
I know the credentials are correct and the servers can communicate, as the smbclient can connect – Dr Gorb May 17 '13 at 11:23
up vote 2 down vote accepted

I could overcome the error with mount -t cifs ... simply add the parameter sec=ntlmsspi to the options. Other possible options are:


I was able to create a mount point with autofs by following the hint number 4 from this site

Some changes needed to be made to /etc/auto.mymount The option sec must be specified. I found the correct parameters here (at the very bottom of the page)

My /etc/auto.mymount ended up containing one line which is:

share -fstype=cifs,rw,noperm,user=ESBSertal,pass=MyPassword,domain=ESB,sec=ntlmsspi ://esb.local/dfs

executing service autofs restart renews the information.

this allowed me to access the contents of the share under /mnt/win/share

share|improve this answer
Accept this answer as the solution please. I had the same problem on Debian and none of the other parameter naming and domain\username tricks in the other answers solved it. Thanks for it! – Daniel Dinnyes Oct 7 '14 at 15:38

I am not sure but instead of CIFS use SMBFS and try to mount your shared partition.

  mount -t smbfs //hostname/share /mnt/temp -o username=someuser,password=somepassword
share|improve this answer
I get mount: unknown filesystem type 'smbfs' – Dr Gorb May 17 '13 at 11:23
smbfs isn't supported in most new OSs anymore anyway. – Nathan C May 17 '13 at 11:30

There doesn't look to be anything inherently wrong with what your doing.

  • Check that the username/password etc don't have punctuation/whitespace and if they do put ' ' around them.

  • Check that the CentOS and Windows firewalls are allow connections (though you'd probably get a different error message for them)

share|improve this answer
I know the credentials are correct and the servers can communicate, as the smbclient can connect – Dr Gorb May 17 '13 at 11:24
@DrGorb: That's not actually what I said to chcek though. – Iain May 17 '13 at 11:28
what I meant is that the credentials are correct and written correctly and that they are accepted by the Windows server and that the Linux server can send them. If I enter wrong credentials I get the same error though – Dr Gorb May 17 '13 at 11:44
@DrGorb: So it won't hurt to put quotes around them just to check will it ? – Iain May 17 '13 at 11:46
tried with single and double quotes: same result – Dr Gorb May 17 '13 at 12:18

Try this command instead:

mount -t cifs //esb.local/dfs -o username=ESBSertal,password=MyPassword,domain=ESB /mnt/win

share|improve this answer
same result as previous – Dr Gorb May 17 '13 at 11:49

I had a similar issue which I solved by putting username=domain.local\username in fstab.

share|improve this answer

For RHEL Linux... I had to put a couple lines in the /etc/request-key.conf

create cifs.spnego * * /usr/sbin/cifs.upcall -c %k

create dns_resolver * * /usr/sbin/cifs.upcall %k

Then mount with this..

mount -t cifs //someDFSaddress/somemountcifsexport  /mnt/somemountpoint -o username=somename (enter the passwd manually)
share|improve this answer

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.