Windows – Can’t mount samba share, but can access using smbclient

mountsambaUbuntuwindows

I have a network share on Windows server in my local network.
I can access this share using smbclient on my Ubuntu 13.10 (with installed cifs-utils package) desktop like this:

smbclient \\\\192.168.5.2\\source -W DOMAIN -U My.User.Name%my.password

but if try to mount this share using mount like this:

sudo mount -t cifs //192.168.5.2/source /mnt/192.168.5.2/ -o username=My.User.Name,domain=DOMAIN,password=my.password

I got error:

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

I also tried to add corresponding line in /etc/fstab file, but it return same error on 'sudo mount -a'
I think it may have something to do with server setup – I disable ntlmv2 in smb.conf adding line:

client ntlmv2 auth = no

without that line smbclient method doesn't work either. But I still can't figure it for mount

Best Answer

Could you check the Security tab of the Windows Share. Does My.User.Name exists in the Group or user names box? Could you check whether the user has enough rights? Could you open windows explorer, navigate to \\192.168.5.2 and check whether the directory appears?

If this works as you already have indicated in the question. Could you indicate whether you have installed sudo apt-get install cifs-utils?

I mount windows folders like this:

  • //<ip>/files /tmp/hello cifs credentials=/home/<user>/.smbcredentials,iocharset=utf8,sec=ntlm 0 0 at /etc/fstab
  • credentials file:
    • username=user
    • password=pass
  • sudo mount -a should mount the folder