How to connect to older samba shares with Ubuntu 20.04?

5,405

To connect to the old samba server add one more option to your smb.conf - above the others you have above:

client min protocol = NT1

If you want to have the older machine access the Ubuntu 20 server you need to add SMB1 support on the server end:

server min protocol = NT1

Then restart smbd: sudo service smbd restart

Reason: The version of Samba in Ubuntu 20 disables SMB1 ( samba calls it NT1 ) on both the client and server end. Although you can make an initial connection to the server it will start with SMB2 by default. There is no SMB2 in Samba 3.x.

Although mount.cifs is controlled by the Linux kernel and not smb.conf it does something similar. By default it starts with SMB2. To do a cifs mount of the older system you need to specify that you want it to use smb1. CIFS calls it vers=1.0. You can also replicate the client lanman auth = yes smb.conf option with a sec=ntlm

So add to your cifs mount statement: vers=1.0,sec=ntlm

Share:
5,405
Janos
Author by

Janos

Retired, playing with and learning linux, other hobbies are classical music and sailing.

Updated on September 18, 2022

Comments

  • Janos
    Janos over 1 year

    My other desktop has linux with samba 3.x I recently upgraded my HP15 laptop from xubuntu 18.04 to 20.04 with a virgin installation. I was able to use cif mounting and file sharing back and fourth from my other linux machine running samba 3.x to my HP laptop vith xubuntu 18.04. Now the HP laptop can only find itself on samba (Thunar Browse network). Based on Internet search the only modifications I made to my smb.conf are

    client lanman auth = yes
    ntlm auth = yes
    

    but there is no connection either way.

    I understand that samba server is not part of the 20.04, only samba-common is included. I did sudo apt install samba but no connection is possible, just errors. Once more: connection was OK with 18.04.

    • Eduardo Trápani
      Eduardo Trápani almost 4 years
      Have you tried to mount using the IP address?
    • Janos
      Janos almost 4 years
      @Eduardo Tramani - yes: Thunar Windows Network smb://192.168.x.x/foo.bar says: Failed to mount Windows share: Software caused connection abort. Same thing with Gigolo.
    • Eduardo Trápani
      Eduardo Trápani almost 4 years
      That's not so descriptive. Could you try with the command line client? (smbclient) Maybe we can get more info on the actual error.
    • Janos
      Janos almost 4 years
      @EduardoTrápani - part of my troubleshooting I purged smbclient, so that command was not available to me. However, the next Answer solved the problem. Thanks anyway for your interest in helping.
  • Janos
    Janos almost 4 years
    Bingo! Thank you. I already had 'vers=1.0' in my cifs mount command and it worked without the 'sec=ntlm' Connection both ways works now.