Setting up a Samba share
This one’s pretty silly, but I decided I would try to use my little potato mini PC as a Samba host. And, it turns out, in the many years since I’ve configured Samba, so I forgot almost everything… and there’s some new stuff, too.
These instructions were only tested on my computer, which is currently running Ubuntu 22.04. May or may not work for you!
Setting up filesystem permissions correctly
Create a new user and group for Samba guest permissions
sudo adduser --system --no-create-home smbuser sudo groupadd editors sudo usermod -a -G editors smbuser
Create a folder (I used
/mnt/public) and make it owned by the group, with
the sticky bit set.
sudo mkdir -p /mnt/public sudo chgrp editors /mnt/public sudo chmod 2770 /mnt/public
This makes it so that all new subdirectories of
/mnt/public are also
Set the Samba share configuration
On my computer it lives in
[public] comment = public anonymous access path = /mnt/public browsable = yes create mask = 0660 directory mask = 0771 writable = yes read only = no guest ok = yes public = yes force user = smbuser
force user = smbuser, which will set all users to use the
local user. If we want to do actual local auth, we’d need to add users with
smbpasswd -a to create their Samba passwords.
This is a new one, but apparently Windows 10+ doesn’t use NetBIOS anymore. Pretty easy, though.
sudo apt install wsdd
This makes it so that Windows 10 and 11 devices actually see
potato in their