Home How to use Samba
Post
Cancel

How to use Samba

  1. Updating and Installing Samba
    1
    2
    
    sudo apt-get update
    sudo apt-get install samba -y
    
  2. Creating Folders and Changing Permissions
    1
    2
    3
    
    ls -al chmod 777 [folderName]
    ls -al
    mkdir [directory name]
    
  3. Adding a new share - smb.conf
    1
    
    sudo nano /etc/samba/smb.conf
    
    1
    2
    3
    4
    5
    6
    7
    
    [folderName]
    path = /home/[studendID]/folderName
    browseable = yes
    read only = no
    valid users = [username]
    guest ok = yes
    create mask = 777
    
  4. Check smb.conf syntax
    1
    
    sudo testparm
    
  5. Restart Server & allow firewall
    1
    2
    3
    
    sudo systemctl restart smbd
    sudo systemctl status smbd
    sudo ufw allow samba
    
  6. Registering user accounts.
    1
    2
    
    sudo smbpasswd -a [Linux user name]
    pw: [enter the value]
    
This post is licensed under CC BY 4.0 by the author.