Im a total newbie of all this and want some help.
Im trying to set up an Samba server with 2 shares, 1 for each user. (so far so good, i think).
After creating two new
- sudo useradd -M name
with ‘passwd’ i install samba.
comment = share1
path = /mnt/usb1
browseable = yes
create mask = 0775
directory mask = 0775
valid users = name1
writeable = yes
and again for name2 / share2.
[Global/Public] Is still untouched.
After that i do
- smbpasswd -a name1
- chmod 770 -R /mnt/usb1
chown -R name1:dietpi /mnt/usb1
I do the same thing for name2 to /mnt/usb2.
Is this safe enough? No guest access, need correct passwd to access each share?
Step two of all this is to use ‘dietpi-sync’ to sync BOTH of this shares to another unit ( Rpi or similar )
But for security reasons i wounder if it is a good way to use a third user, e.g dietpi for the sync process?
How do i do that?
- valid users = name1, dietpi
- chown -R dietpi:dietpi /mnt/usb1
Is there a better way to do this? Or am i way off in my thinking?