7

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

Micha

  • 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:graphics-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 – Micha Roon 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
3

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

ntlmssp
ntlmv2
ntlmv2i

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

  • 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
2

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)

  • I know the credentials are correct and the servers can communicate, as the smbclient can connect – Micha Roon 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 – Micha Roon 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 – Micha Roon May 17 '13 at 12:18
2

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.

  • I know the credentials are correct and the servers can communicate, as the smbclient can connect – Micha Roon May 17 '13 at 11:23
1

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
  • I get mount: unknown filesystem type 'smbfs' – Micha Roon May 17 '13 at 11:23
  • smbfs isn't supported in most new OSs anymore anyway. – Nathan C May 17 '13 at 11:30
1

Try this command instead:

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

  • same result as previous – Micha Roon May 17 '13 at 11:49
0

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

0

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)
0

I had the same problem and fixed it by first:

smbclient -L server_name --user=DOMAIN/user_name -d=10 > output 2>&1

then

grep -i ntlm output

Which had a line that said

Got NTLMSSP neg ....

I then changed my mount line to be

mount -t smbfs //server_name/share_dir /mnt/mount_point -o user=DOMAIN/user_name,sec=ntlmssp

FINALLY!

Would like to credit the Dr. Gorb response for leading me to this solution, but don't have enough reputation to add a comment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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