Sadly, it looks like I'm going to just give up on Samba. I have a mix of Linux systems, old and less-old Windows, and OS/2 (Windows and OS/2 in VMs). At one point years ago Samba could communicate among all, but after an upgrade a while ago I could no longer see OS/2. I assumed it was me and spent hours reading help and playing with the config file, the firewall, etc. Now with 24.04.2 LTS it seems I may not be able to see anything. I came across some posts that indicate this is a protocol problem and not a Samba problem. (This doesn't surprise me, because Microsoft has never worried about compatibility even with their own products) I'm just going to fall back to sneakernet for the windows boxes and FTP for OS/2. Thank heavens FTP still works.
It happens that I worked on that last week. On Linux enable samba as usual. I have my NAS offering a share \\truenas\share
for everyone in the network. On Win, you have to
- make sure WORKGROUP is the same
- Control Panel | Programs | Firewall options | enable smb1 (you have to reboot)
- in group policy editor | templates | Network | Lanman workstation enable allow insecure logon
Windows File manager | open network, you will see
truenas
share
or from cmd
net use L: \\truenas\share
net use L: /delete to remove it
If you need access to the share using valid users, it gets more complicated.
... and if, by some remote chance, that what Pavlos has offered doesn't work for you, would the FUSE approach offer an acceptable alternative?
On linux, a typical /etc/samba/smb.conf
for example for hostname mypc
workgroup = WORKGROUP
...
[iso]
path = /root/iso
writable = yes
guest ok = yes
So, \\mypc\iso
can be seen from Windows and save iso's.
Are these woes on the server or client side?
I think Samba on the server side is challenged due to the weaker security of older clients. Newer Windows is also making it difficult if dare speaks of the older protocol.
For me, I spin up a Docker container when I need to transfer files across the LAN. It doesn't cause a fuss and works in Windows 11 all the way back to Windows 9x, as well as on my Android device. I haven't set up any authentication (guest share), but I trust my LAN with it only running temporarily.
#!/bin/bash
sharename="Share"
readonly="yes"
sudo docker run -it \
-p 137:137 \
-p 137:137/udp \
-p 138:138 \
-p 138:138/udp \
-p 139:139 \
-p 139:139/udp \
-p 445:445 \
-e SMB=1 \
-e RECYCLE=0 \
-e SHARE="$sharename;/share;yes;$readonly;yes" \
-e USERID=1000 \
-e GROUPID=1000 \
-e WORKGROUP=WORKGROUP \
-v "$(realpath .)":/share \
dperson/samba -n
That $(realpath .)
shares the directory of where it was run. In the client, I'd use the IP address and connect directly, e.g. \\192.168.1.10\Share
It's not an official Samba thing, here's the repository about the Docker image with other examples. I prefer the Docker approach since once it works, it can't change/break and will be more persistent (in terms of Samba versions). If you're setting up a Linux file server for a home LAN, the Docker method could work better: Passing commands to a script/container versus writing the config manually.