0

I have Mint 19.3 Gnome/Xfce installed on an old Dv7 HP laptop and a WDTVLive Hub on the network with 2tb internal and 2 external HDD connected acting as a NAS.

I want to automount the shares(internal, HDD(1tb) & HDD(2tb)) so I can use them with Plex Media Server on the Mint machine.

The shares can be seen in the file explorer in Mint. I can access the folders and files in file explorer no problem.

I created a directory /media/shares/ where I would like to add the shares. I need help determining what the parameters are for mounting the shares.

$ sudo smbstatus
Samba version 4.7.6-Ubuntu

$ sudo less /etc/passwd | grep plex      
plex:x:999:999::/var/lib/plexmediaserver:/usr/sbin/nologin

$ id
uid=1000(tjohannes) gid=1000(tjohannes) groups=1000(tjohannes),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),112(lpadmin),129(sambashare)

$ net lookup wdtvkids
192.168.1.95

$ smbtree
MEDIACENTER
    \\WDTVKIDS              WDTV LIVE
        \\WDTVKIDS\IPC$             IPC Service (WDTV LIVE)
        \\WDTVKIDS\Seagate_Backup_Plus_Drive    Seagate_Backup_Plus_Drive
        \\WDTVKIDS\New_Volume       New_Volume
        \\WDTVKIDS\WDTVLiveHub      WDTVLiveHub

$ sudo smbclient -L 192.168.1.95 -U%
WARNING: The "syslog" option is deprecated

    Sharename       Type      Comment
    ---------       ----      -------
    WDTVLiveHub     Disk      WDTVLiveHub
    New_Volume      Disk      New_Volume
    Seagate_Backup_Plus_Drive Disk      Seagate_Backup_Plus_Drive
    IPC$            IPC       IPC Service (WDTV LIVE)
Reconnecting with SMB1 for workgroup listing.

    Server               Comment
    ---------            -------
    WDTVKIDS             WDTV LIVE

    Workgroup            Master
    ---------            -------
    MEDIACENTER          WDTVKIDS

I'm not sure what parameters are needed. I added a user/pass and changed the workgroup to WORKGROUP. This is what I have so far based on the above info sudo mount -t cifs //192.168.1.95/New_Volume /media/share -o user=user,password=pass,workgroup=WORKGROUP but it returns mount error(2): No such file or directory

Any help would be appreciated.

Chris Davies
  • 116,213
  • 16
  • 160
  • 287
  • If that screenshot is of the laptop where you have Mint installed, then it looks like those shares are mounted or else they wouldn't appear. Can you go into the folders and see the contents? Is there something else in /etc/fstab that could be causing that error? Add the contents of /etc/fstab to the question. – Nasir Riley Feb 29 '20 at 08:45
  • 3
    did you actually put quotes into your fstab? – SparedWhisle Feb 29 '20 at 09:13
  • Thanks for the reply. No quotes in the fstab and I will add it to the question. The shares are mounted by simply accessing them through the file manager and yes the folders and files are available to view(I have not tried to open any of the files). The problem is not mounting per se but autmounting with fstab. – rebellelouch Feb 29 '20 at 19:25
  • Does mount -t cifs -o uid=999,gid=999,guest,iocharset=utf8 //192.168.1.95/New_Volume /media/share work (as root)? If not, the issue isn't with fstab it's with your mount parameters. – Chris Davies Feb 29 '20 at 23:33
  • @roaima No. I cannot mount that. mount error(2): No such file or directory Can we break it down? How can I be sure what the shares address is? I used net lookup wdtvkids to get the IP address of the device. You can see the folders above once in the root. I assume that means I could call the share //192.168.1.95/New_Volume and I used sudo mkdir /media/share to create the target folder. The rest I am unsure about. What determines if a user/pass is needed? On the WDTV settings I see workgroup named MEDIACENTER that I cannot remove. Do I need to enter that in the mount code? – rebellelouch Mar 01 '20 at 00:11
  • Please don't put updates here in the comments. It's harder to piece everything together. Instead, [edit] your question to include new things there. – – Chris Davies Mar 01 '20 at 00:15
  • I simplified my question. I just need help with the mounting parameters. Thanks! – rebellelouch Mar 01 '20 at 04:09
  • There are a couple of ways to access samba shares. The GUI browser is probably using gvfs-mount; whereas you are trying to mount it via fstab. https://unix.stackexchange.com/questions/82194/proper-way-to-mount-samba-share?rq=1 – ILMostro_7 Mar 01 '20 at 04:20
  • Thanks @ILMostro_7 Sadly, I still cannot mount the share. I cannot understand what I am doing wrong. Why do I continue to get mount error(2): No such file or directory no matter what I try? – rebellelouch Mar 01 '20 at 06:56
  • 1
    Please try adding vers=1.0 to the mount options. If that still fails then replace 1.0 with 2.0, 2.1, 3.0 in turn. Keep the highest value that works. – Chris Davies Mar 01 '20 at 13:21
  • @roaima adding the vers=1.0 did work to mount in my case. I added to fstab as well and tested successfully. No other versions worked for me. The WDTV device is 10 years old and its last software release was in 2013. Apparently Linux support was not important to the devs. – rebellelouch Mar 01 '20 at 19:42
  • It's nothing to do with Linux support; it's that ten years ago SMB 1.0 was still an acceptable version of the protocol. – Chris Davies Mar 01 '20 at 22:30

2 Answers2

1

Please try adding vers=1.0 to the mount options. If that still fails then replace 1.0 with 2.0, 2.1, 3.0 in turn. Keep the highest value that works.

What you're doing here is downgrading the SMB version from the current (3.1) to the oldest (1.0). Many older devices still only use SMB version 1.0.

Chris Davies
  • 116,213
  • 16
  • 160
  • 287
0

For backward compatibilty, I have set mine to SMB version 2.1, on Windows 10. Here is the complete syntax for your reference.

override.vm.synced_folder ".", "/vagrant", type: "smb", smb_username: "#{ENV['VAGRANT_SMB_USER']}", smb_password: "#{ENV['VAGRANT_SMB_PASS']}", mount_options: ['vers=2.1']