Can't mount samba share, but can access using smbclient

12,339

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
Share:
12,339

Related videos on Youtube

ShockwaveNN
Author by

ShockwaveNN

Testing Automation

Updated on September 18, 2022

Comments

  • ShockwaveNN
    ShockwaveNN over 1 year

    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

    • Admin
      Admin about 10 years
      Is there possibly another session to the server already established with different credentials? Only very recent versions permit multiple security tokens across the same channel.
    • Admin
      Admin about 10 years
      No, there is no another session to this server
    • Admin
      Admin almost 9 years
      @ShockwaveNN have you ever figured out what the problem was?
  • 030
    030 about 10 years
    Which Windows version are you using?
  • dmeu
    dmeu almost 9 years
    I have the exact same problem, and also via the fstab-option, i get a Permission denied error