Ubuntu – How to get the ubuntu shared folders appearing under network in windows 10

networkingpermissionsraidsambaserver

My home network is as follows:

1. File Server -> Ubuntu 18.04
2. Workstation/Gaming Rig -> Windows 10
3. Dev laptop -> Ubuntu 18.04

I want to make my shared files work easily with both my machines and also for anyone else who jumps on the network like housemates etc.

The file server has a 2x 120gb SSDs in raid 1 for boot, 2x 2tb HDDs in raid 1 for my dev files called Dev and a spare 2tb drive shared for network accessible media in my house called Media.

I've shared the folders by opening each one up and going into properties and enabling sharing, granting all permissions and checking both the guest access and allow others to create and delete files in this folder. I do plan to change permissions on the dev drives later but I just need it to work first.

From my laptop I can go Files -> Other Locations and see the server there, I can click on a Share and access my files.

On Windows if I open Explorer and click Network I cannot see the server. I really want it to appear here because I don't want to have to map drives manually I want the files easily accessible.

How do I make the network drives visibile under network in Windows 10? Do I need to use Samba or is the method of sharing I'm doing fine?

[1] It sounds like you already are using Samba. Please verify by running this command:

net usershare info --long


[2] Ubuntu 18.04 automatically "registers" your samba server to the rest of the network using mDNS ( Avahi ). All other Linux machines as well as macOS can "discover" this registration automatically.

[3] The reason Win10 cannot discover your server is becase although it can use mDNS it does not know how to scan the network for them automatically. Instead it uses NETBIOS and there are multiple problems with that:

[a] Win10 disables SMB1 on the client side ( as well as the server side ) and NETBIOS ( host name discovery not name resolution ) and SMB1 are linked - can't have one without the other. You can re-enable it by going to Control Panel > Programs and Features > Turn Windows features on or off > SMB 1.0/CIFS File Sharing Support > SMB 1.0/CIFS Client.

[b] But then you have to follow the NETBIOS rules - namely that your host name cannot be greater than 15 characters in length - among other things. Those kinds of things can be corrected in smb.conf. What you could do is edit /etc/samba/smb.conf and add these two line right below the workgroup = WORKGROUP line:

netbios name = ubserv1804
name resolve order = bcast host lmhosts wins


Then restart samba in this order:

sudo service smbd restart
sudo service nmbd restart


Then wait about 10 minutes or so - seriously. NETBIOS is so primitive that a restart of nmbd causes confusion in Windows and it takes a bit for it to act normal again.