Quick samba setup Debian 2019

  linux, samba
# be root
sudo su

apt install samba -y

# add a new user with no home directory
useradd -M backupuser

# and who can't ssh into the box
usermod -L backupuser

# create a new group
groupadd samba

# add user to group
usermod -a -G samba backupuser

# give the user a password
smbpasswd -a backupuser

# edit the config
nano /etc/samba/smb.conf

# at the top, under workgroup = WORKGROUP, add:
server min protocol = NT1
client min protocol = NT1
# otherwise you might get error: Unable to connect with SMB1 -- no workgroup available

# also add this, otherwise you get: "System error 86 has occurred. The specified network password is not correct".
ntlm auth = true

# Add at bottom of the smb.conf:

# my drives
[backuper-sandisk-terra]
comment = This is the /mnt/terra shared drive
path = /mnt/terra
browseable = yes
read only = no
guest ok = no
writable = yes
admin users = backupuser
write list = backupuser
create mask = 0775
directory mask = 0775
public = no

# restart service
service smbd restart

# browse box, go to your server, ex: \\192.168.1.51\ and log in as your user.