I just want to get into a public record that nowadays you need to add these configurations into the [Global] section of /etc/samba/smb.conf to make Windows XP able to connect to your Samba 4.5 server:
server max protocol = NT1
lanman auth = yes
ntlm auth = yes
Of course that compromises the security on some level I am deliberately unaware of.
1st part: The user that will connect, should have a Samba password on the Ubuntu machine:
You can a smb password for a user defined on your machine with the command
sudo smbpasswd -a <username>
Replacing <username>
with the name of the user that will be connecting to a SMB share on your Ubuntu machine. This user must be aleardy existing user on your machine.
2nd Part
It helps to browse the SMB shares if the computers are willing to act as masters for the SMB protocol. In the [Global] section of the file /etc/samba/smb.conf
add the lines
local master = yes
preferred master = yes
3rd part
Windows now uses WSD (web services discovery?) which is not included in the various Samba's that are available as of Ubuntu 19.04.
There is a project at github which implements WSD, written in Python. It can be found at https://github.com/christgau/wsdd or directly downloaded at https://raw.githubusercontent.com/christgau/wsdd/master/src/wsdd.py
Part of the trick to using this is that you will need to enable a couple of ports through your firewall:
Ports 5357/tcp and 3702/udp need to be open for wsdd to run.
wsdd can be run from the command line, or you could create a systemd service to run it.
This is an active (maybe) area of Samba development, and some information about it can be found at https://www.ixsystems.com/community/resources/how-to-kill-off-smb1-netbios-wins-and-still-have-windows-network-neighbourhood-better-than-ever.106/ and is currently available in the Arch user repository, and apparently a few other distros as well. It is also mentioned in AskUbuntu at
make samba share visible in Windows "Network"
Starting as a service
I created a systemd service unit file for wsdd as /lib/systemd/system/wsdd.service
contents are
[Unit]
Description=WSDD Network Service
BindsTo=smbd.service
After=smbd.service
[Service]
Type=simple
RemainAfterExit=yes
ExecStart=/usr/bin/wsdd
#ExecReload=/user/bin/wsdd
[Install]
WantedBy=multi-user.target
Then I moved wsdd.py
to /usr/bin/wsdd
, and modified its permissions to 555 (read and execute).
Finally, sudo systemctl enable wsdd.service
and a reboot - and my Ubuntu system is now visible to my Win10 computers.
Best Answer
The problem isn't the permissions on Data it's the fact that the system sets up an access control on /media/abdelkrim such that only that user can get to Data.
You have two options:
[1] Move the mount point up a level so that it mounts to
/media/Data
then share that.[2] Or edit
/etc/samba/smb.conf
and add a line underworkgroup = WORKGROUP
:Then restart smbd:
sudo service smbd restart