3

I am playing around with a share on my NAS being unable to mount a SMB share. Based on the ubuntu smb documentation the command for mounting a SMB / CIFS should be as following:

sudo mount -t cifs -o username=test,password=pw1234 //<server>/home ~/test

The error message is:

mount error(2): No such file or directory
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

I already tried the following things:

  • replaced ~/test with absolute path /home/pi/test - no change
  • checked that /home/pi/test exists - the folder exists
  • tried to mount the share using windows 7 (user + pw) - worked
  • pinged the server - server is reachable
  • checked smbclient for the share

    smbclient -U test -L //<server>
    WARNING: The "syslog" option is deprecated
    Enter test's password:
    Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.4.16]
    
    Sharename       Type      Comment
    ---------       ----      -------
    ...
    home            Disk      Home directory of test
    Domain=[WORKGROUP] OS=[Windows 6.1] Server=[Samba 4.4.16]
    
  • tried adding "vers=1.0", "vers=2.0", "vers=2.1", "vers=3.0" to -o flag

    sudo mount -t cifs -o username=test,password=pw1234,vers=1.0 //<server>/home /home/pi/test/
    mount error(2): No such file or directory
    Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
    
  • tried adding "sec=ntlm" to -o flag

    sudo mount -t cifs -o username=test,password=pw1234,sec=ntlm //<server>/home /home/pi/test/
    mount error(22): Invalid argument
    Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
    
  • tried the -v flag of mount

    sudo mount -v -t cifs -o username=test,password=pw1234 //<server>/home /home/pi/test/
    mount.cifs kernel mount options: ip=<correct_ip>,unc=\\<server>\home,user=test,pass=********
    mount error(2): No such file or directory
    Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
    
  • tried adding "nodfs" to -o flag from this unix-stackexchange post

  • read can not use mount.cifs: mount error(2): No such file or directory

Here the specs of the pi:

  • uname -a : Linux 4.14.52-v7+ #1123 SMP Wed Jun 27 17:35:49 BST 2018 armv7l GNU/Linux

Your Answer

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

Browse other questions tagged or ask your own question.