Skip to content

Latest commit

 

History

History
61 lines (50 loc) · 984 Bytes

samba.md

File metadata and controls

61 lines (50 loc) · 984 Bytes

How to install and config samba service on the Debian 9?

Pre-work

  1. Update the debian system.
sudo apt-get update && apt-get upgrade
  1. Install samba service
sudo apt-get install -y samba

Add samba user who can visit the share documents and folders.

  1. Create the samba user group.
groupadd samba
  1. Create the system user who can't login the server.
useradd -g samba -M -s /sbin/nologin admin
  1. Set the user password.
passwd admin
  1. Set the samba login password.
smbpasswd -a admin

Set the share folder.

  1. Create the user share folder.
mkdir /home/admin
  1. Change the folder previlieges.
chmod 777 /home/admin

Samba configuration file.

vim /etc/samba/smb.conf
[Blu-ray]
    comment = blue ray
    path =  /home/admin
    public = no
    valid users = admin
    write list = admin
    create mask = 0777
    directory mask = 0777