Skip to content

How To Configure a Samba Server

jdrch edited this page Mar 26, 2020 · 3 revisions

Step 1: Create a Samba user matching your client OS credentials

smbpasswd -a MyUsername

Step 2: Use chown and chmod to ensure your OS account has access to the shared folder

sudo chown MyUsername /SharedFolderPath

and then:

sudo chmod 770 /SharedFolderPath

Step 3: Edit smb.conf as below:

[global]
   security = user

   #In addition to the rest of what's there for [global]

[SharedFolderName]
  comment = Insert comment here
  read only = no
  browseable = yes
  writable = yes
  valid users = MyUsername
  path = /SharedFolderPath
  create mask = 0770
  directory mask = 0770
  force user = MyUsername

Step 4: Restart the samba service

sudo /usr/sbin/service smbd restart

Source: https://www.reddit.com/r/debian/comments/csc3vt/buster_i_can_access_smb_share_from_windows_10/exe050g/

Clone this wiki locally