2

I have a DNS 323 NAS and set up the SMB Share. I've tested the access on Windows, so it working. It connected, and asked for login and password, and showed the files.

But I cannot access the SMB using my Ubuntu 20.04.1 LTS in which I'm using KDE as the desktop.

  • The Dolphin solution cannot connect, even I've written

    smb://user@192.168.1.1/ on the location.

  • I've tested with smb_client, as suggested here

    $ smbclient -L //192.168.1.1
    protocol negotiation failed: NT_STATUS_CONNECTION_DISCONNECTED
    
  • Also tested the cifs suggestion did not work, either.

    $sudo mount -t cifs -o username=user //192.168.1.1 /media/NAS/
    mount: /media/NAS: special device //192.168.1.1/ does not exist.
    

Is there something that I'm missing so that I can connect to my NAS using my Linux machine?

kelalaka
  • 513
  • I connect successfully to my Synology NAS in 20.04.1 using the following line in my fstab `//192.168.1.117/share_name /media/NAS/share_name cifs username=user_name,password=user_password,rw,uid=1000,gid=500

    `

    – graham Jan 12 '21 at 19:20
  • @User24601 Thanks, that requires the password written, though, I have got this error mount: /media/NAS: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program. – kelalaka Jan 12 '21 at 19:24
  • the username and password can be saved in a separate file. Sorry, my bad formatting.. there is a space between cifs and username – graham Jan 12 '21 at 19:28
  • 2
    did you install cifs-utils? sudo apt-get install cifs-utilsThe file I mentioned is .smbcredentials to store user and password – graham Jan 12 '21 at 19:33
  • @User24601 no it is not installed. After installation, now with this in fstab //192.168.1.1 /media/NAS cifs username=user,password=passwd,rw,uid=1000,gid=500 returns mount error(22): Invalid argument Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg) with sudo mount /media/NAS – kelalaka Jan 12 '21 at 19:38
  • there should not be a line break after cifs but a space before continuing with username=xxxx,password=xxx – graham Jan 12 '21 at 19:44
  • not required in my case but this answer suggests using vers=1.0 – graham Jan 12 '21 at 19:46
  • //192.168.0.102/Volume_1 /media/NAS cifs vers=1.0,noauto,users,username=User,password=Pass,iocharset=utf8 This solved. The final mistake was the required Volume_1 that Windows did not required. Thanks for the help. If you want, write a answer? – kelalaka Jan 12 '21 at 19:57

1 Answers1

4

Using a Synology NAS in 20.04.1 I can successfully access my NAS by adding the following to my fstab file:

//192.168.1.117/share_name /media/NAS/share_name cifs username=user_name,password=pass_word,rw,uid=1000,gid=500

and sudo apt-get install cifs-utils

After some experimentation, the OP has found that the following line in his fstab works seamlessly:

//192.168.0.102/Volume_1 /media/NAS cifs vers=1.0,noauto,users,username=User,password=Pass,iocharset=utf8

where instead of the share_name he has included /Volume_1 set at the time of initialising the NAS which Windows did not require to establish the connection under that regime.

graham
  • 10,436