SAMBA server beginner help wanted!

Im a total newbie of all this and want some help. :stuck_out_tongue:
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.

  • /etc/samba/smb.conf

i add

  • [share1]
    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?

Here is a walkthru…it might help

Anyone more experienced want to chime in?

Ah, thank you! :slight_smile: Will have a look!

I am also very interested in this topic, has the author made it?

I have found an article that introduces how to make a NAS box by Raspberry pi. It is very convenient and small.