10

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

Micha Roon
  • 294
  • 1
  • 2
  • 10
  • 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 ? – user9517 May 17 '13 at 10:53
  • check your password . for me password was wrong that's why was getting a permission denied. – Jagrut Trivedi Jan 16 '23 at 11:09

8 Answers8

6

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

Micha Roon
  • 294
  • 1
  • 2
  • 10
  • 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 07 '14 at 15:38
  • I had the same problem now and it's working with that parameter when i try to mount a Synology drive. – René Höhle Aug 18 '23 at 10:44
3

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.

Meiko Watu
  • 364
  • 3
  • 15
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)

user9517
  • 115,471
  • 20
  • 215
  • 297
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
1

Try this command instead:

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

Nathan C
  • 15,059
  • 4
  • 43
  • 62
1

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)
masegaloeh
  • 18,236
  • 10
  • 57
  • 106
Jack
  • 11
  • 1
  • it didn't help with my mount issue but it pointed out a difference in configuration I was not aware of and part of a final solution. thank you – TecHunter Jul 04 '22 at 09:42
0

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

Sawtaytoes
  • 143
  • 8
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.