Score:0

Not able to access files on XUbuntu box from Ubuntu box

kr flag

I have a Ubuntu 20.04 box and a XUbuntu 20.04 box, both with Samba installed. I want to access the Public folder (in my /home directory) on the XUbuntu box from the Ubuntu box. On the XUbuntu box, I've created a share (since the default File Manager - same problem after I installed Nautilus on XUbuntu box - does not give an option for Sharing a Folder) using the Terminal command 'net usershare add Public /home/john/Public' which was accepted. I get the message "Failed to retrieve share list from server: connection timed out" when using Nautilus (on the Ubuntu box, either by clicking on the XUbuntu box name in Networks or Connect to Server). Both boxes have static LAN ip addresses. Help. PS similar problem when accessing a Folder on the Ubuntu box from the XUbuntu box.

Score:0
kr flag

As Morbius1 suggested, sudo smbpasswd -a john on both boxes solved problem. Doing that on one box allowed access to appropriate folder on other box. Interestingly. Generally, I use X2Go on the Ubuntu box to do some work on the XUbuntu box (which is an 8 year old Intel NUC box), which I only use for things like nginx web server & WireGuard VPN.

Score:0
es flag

There is a bug in the gvfs backed of both OS's you are using that forces the initial contact with a server using SMB1. There is no SMB1 on the server since it was disabled for security reasons so it fails.

You have three options:

Reinstate SMB1 ( Samba calls it NT1 ) on both systems.

Edit /etc/samba/smb.conf and right under the workgroup = WORKGROUP line add these two:

server min protocol = NT1
client min protocol = NT1

Then restart the box. Restarting services is not enough you have to reboot.

Bypass the gvfs bug, keep smb.conf as it is, but ask for the server AND it's share explicitly in the file manager:

smb://ip-address-of-the-server/share-name

You can also use the mDNS host name ( host name with a .local attached at the end ) smb://server-host-name.local/share-name

Or you can do a cifs mount which will also bypass the bug since it doesn't use gvfs or the samba client.

I can show you how to do that if you require it.

kr flag
I've tried the explicit share ask by using smb://192.168.1.11/public and smb://JOHNNUC.local/public and amending smb.conf on both boxes with restart on both boxes as instructed above. Neither method works:@ they both give timeouts (Failed to mount Windows Share: Timeout" from Ubuntu to Xubuntu. From XUbuntu to Ubuntu, it doesn't show the Public folder though it shows the print$ folder. Should I remove the net usershare for the Public folder on both boxes?
Morbius1 avatar
es flag
Do you have the firewall enabled on the server? Turn it off to see if it is in the way: `sudo ufw disable`
kr flag
I have the firewall enabled on both boxes. I'm reluctant to turn it off on either box. I've just run grep -i NETBIOS /etc/services and it shows ports 137, 138, 139 for both tcp & udp. Does that result seem reasoanble?
kr flag
PS I don't seen anything on doing a tail for the XUbuntu box on /var/log/kern.log.
Morbius1 avatar
es flag
I don't see how this will work without at least allowing samba through the firewall: `sudo ufw allow Samba`
kr flag
I've allowed Samba through the firewall on each box. The preset rule in GUFW set up rules for ports 137, 138, 139 & 443. I can now see my folder on the XUbuntu box from the Ubuntu box. However, it still timed out on the XUbuntu box when trying to see my folder on my Ubuntu box after It asked for my user & password for the sharename which I supplied. I'll check my smb.conf file on both boxes.
Morbius1 avatar
es flag
You also need to look at the usershare you created: `net usershare info --long`
kr flag
'net usershare info --long' shows: john@johnpc:~$ net usershare info --long [Public] path=/home/john/Public comment= usershare_acl=Everyone:R,Unix User\john:F, guest_ok=n
kr flag
Only interesting thing is that when connecting from Ubuntu box to XUbuntu box, it has on Nautilus showing each box with an extra image with 'File Sharing' text. These are not present when going from XUbuntu box to Ubuntu box using either Nautilus or XUbuntu's default File Manager of Thunar.
Morbius1 avatar
es flag
Other than you never mentioned creating a samba password for john on the server `sudo smbpasswd -a john` the usershare looks ok. Maybe something odd about your smb.conf or perhaps avahi isn't running on both machines `sudo service avahi-daemon restart`
kr flag
avahi was running on both boxes: checked by using status on service command which made no difference. I don't think I'd done sudo smbpass -a john on either box. So I did it on both boxes and everything Ok. Thanks, Morbius1.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.