2

after upgrading to 20.04, I am now unable to access samba shes on older nas or older samba servers.

I have tried editing the smb.conf, and adding "client min protocol = CORE". This partly fixes the issue and authenticates and lets you view folder inside the share, but then all the files inside appear as folder. I am unable to copy the files out to access, and cannot open them in caja, which I think will be the same in Nautilus.

Other than that I am enjoying 20.04 :)

thanks in advance

Bigley

3
  • 1
    I think this is a bug: askubuntu.com/questions/1233727/…
    – Nmath
    May 14 '20 at 1:43
  • It is a very annoying bug, as there prob literally millions of Linux users that still need access to these older protocols. It is ok to disable on a default install, but there really needs to be options to re enable as necessarily, or warning dialogue when connecting to older protocols. The requirement to install a patch PPA to fix being able to access network shares is more of a downgrade than an upgrade May 14 '20 at 12:00
  • yer guess so, assume once a fix comes out, all I do is remove the ppa to uninstall the patch? Will remember not to upgrade so fast next time. Just thought 20.04 being an lts version would be extra stable. May 15 '20 at 1:37
0

Just for completeness...as I could not read the exact instructions from the posts. If you have a NAS (e.g. FritzBox) that uses SMB1 you can make nautilus/gio downgrade the smb connection with the following commands, if you don't already have a .smb/smb.conf file (like me):

mkdir ~/.smb
echo "[global]" > ~/.smb/smb.conf
echo "client min protocol = CORE" >> ~/.smb/smb.conf

As an alternative for FritzBox users you could possibly upgrade your FritzBox to SMB2/SMB3 using the experimental Fritz!Lab OS. See https://en.avm.de/service/fritzbox/fritzbox-7490/knowledge-base/publication/show/3327_SMB-versions-supported-by-the-FRITZ-Box/

Then you possibly don't need this workaround, but I didn't test that yet.

The bug with the files showing as folders is fixed now in Ubuntu 20.04 (focal) with smblibs package version 4.11.6+dfsg-0ubuntu1.2

0

I found my issue was the samba client (as I don't have samba server running at all anywhere in my setup).

The desktop client (MATE Caja file manager) would see the NAS server with the wrong name. It would see the NAS box name (mynas) rather than the configured SMB server name (homebackup).

When I used :

$ smbclient //homebackup/mybackup

I was able to connect and browse and copy files via smbclient.

So I went into Caja and manually typed :

smb://homebackup/mybackup

And wala the share appeared.

So for me the only problem is browsing the network and not attaching to shares.

Even after manually connecting in this way the Caja browser still shows mynas instead of homebackup under networks!!!

-1

You have 2 options:

[1] Install a PPA "fix" so that you can continue to do this through caja.

The details are listed in the bug report: https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1872476

And the PPA can be found here: https://launchpad.net/~sergiodj/+archive/ubuntu/samba-bug1872476-v2

[2] I would strongly suggest you use a CIFS mount instead.

This way you can leave smb.conf alone and create a specific mount to your NAS box with earlier versions of smb.

There's an example of how to do that in another question here: 20.04 upgrade makes NAS unavailble

EDIT: I understand your reluctance to have mounts in fstab but it could be set up as a systemd automount then it doesn't mount on boot - it will only mount when you access the mount point.

The following is just a suggestion. If Step [1] doesn't work there is no point in setting it up in fstab.

[1] Do a temporary mount first to make sure it works:

** Create a mount point ( do not put it in your home directory or under /media:

sudo mkdir /mnt/NASx

** Do a temporary mount:

sudo mount -t cifs //nas-ip-address/share-name /mnt/NASx -o username=xxxx,password=yyyy,uid=1000,vers=1.0,sec=ntlm

[2] If step [1] works you can set this up as an automount in fstab:

** Unmount the share:

sudo umount /mnt/NASx

** Add this to /etc/fstab

//nas-ip-address/share-name /mnt/NASx cifs username=xxxx,password=yyyy,uid=1000,vers=1.0,sec=ntlm,noauto,x-systemd.automount 0 0

** THen reset systemd:

sudo systemctl daemon-reload
sudo systemctl restart remote-fs.target

** Then access /mnt/NASx to verify its contents.

noauto = prevents the mounting at boot.

x-systemd.automount = mount the remote share only when the mount point is accessed.

5
  • Hi, thanks for the prompt reply. I would really prefer to use samba, as i attach my network drive inside the gui as needed as i connect to different networks, so putting permanent cifs links in fstab would not be feasible. May 12 '20 at 18:57
  • I tried adding the fix PPA and it installed successfully, but the issue of objects or files still appears as folders. My distro is Ubuntu Mate. Lastly, this issue only happens to my older NAs, the newer one only needs the NT1 compatibility enabled. any help is greatly appreciated :) May 12 '20 at 19:04
  • Please see my edit above. I don't want to force you to do a cifs mount, but .... My edit is just a suggestion that makes it so it will mount only when you want it to mount.
    – Morbius1
    May 12 '20 at 19:31
  • Ok managed to get your PPA fix working! (test on old Ubuntu samba share server)This PPA did not work launchpad.net/~panfaust/+archive/ubuntu/samba-bugfix, but this one did launchpad.net/~sergiodj/+archive/ubuntu/samba-bug1872476-v2 which was from the bugs.launchpad. Many thanks Morbius1, hope others can benefit from this soltuion too :) May 12 '20 at 20:53
  • Updated my answer to your PPA link. Thanks
    – Morbius1
    May 12 '20 at 21:08

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.