TransWikia.com

Accessing Windows 10 files from Ubuntu 20.04

Ask Ubuntu Asked by JohnW on February 2, 2021

I am a novice Linux user. I have a Raspberry Pi 4 and have used Raspbian on it and have had no problems accessing my Windows 10 files shares. I wanted to try Ubuntu to see how it compares. I tried the Kbuntu version and had no luck so I switched to Ubuntu Server 20.04 and then installed Ubuntu Mate on it. Everything seemed fine. I then wanted to try the file sharing part of things and so my first step was to install Samba which seemed to go fine. However, I still cannot get to my Windows 10 file shares. I have SMB installed on the Windows machine. I keep getting the error that it “cannot retrieve file shares: connect connect to server”. I have looked everywhere for a good, comprehensive set of instructions on the pieces that need to be installed, how to configure them, etc. I find bits and pieces but nothing that seems to give me the whole picture on both ends. Any help will be gratefully appreciated.

2 Answers

I've tried a lot of available guides online, and only the guide provided here has worked in my situation. The crucial step for me was to open TCP ports 139 and 445 and UDP ports 137 and 138, because smbd and nmbd programs used by samba listen on these ports. The command to open ports

sudo ufw allow samba

Answered by Arsen on February 2, 2021

You have a bit of work to do if you expect to "discover" then "connect" to a Windows 10 machine from Ubuntu 20.04.

In Win10 you have to have SMB 1.0/CIFS Server enabled.

In Ubuntu 20.04 you have to enable SMB1 on the client side. You do that by editing /etc/samba/smb.conf and right under the workgroup = WORKGROUP line add this one:

client min protocol = NT1

( Samba calls smb1 NT1 just to confuse people )

You could restart smbd: sudo service smbd restart But the best thing to do is just reboot.

Reason: The version of Samba in Ubuntu 20.04 disables SMB1 on both the client and server side just like Win10 does. Without SMB1 there is no NetBIOS discovery or name resolution.

The alternative is to leave Ubuntu and Win10 alone and access the Win10 machine and it's share directly using mDNS ... or by ip addresss:

In the Location bar of caja enter the mDNS network path to your Win10 machine and it's share - don't forget the .local at the end.

smb://win10-host-name.local/share-name

mDNS in Linux is called Avahi and Ubuntu server doesn't install it by default. I don't know if installing MATE over the server brings it in so just to be sure install it manually:

sudo apt install avahi-daemon

Answered by Morbius1 on February 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP