Install Samba on Ubuntu Linux

ubuntu-linux-samba

I have already installed Samba on Arch Linux and the installation has only minor differences compared to Arch Linux. Once Samba is installed you can configure Samba shares, create Samba public share and setup Samba home share.

 

Install Samba

Install Samba package.

sudo apt-get install samba

 

Configure Samba shares and optionally configure Samba home share and Samba public share.

 

Check Samba configuration file for syntax errors.

testparm

 

Set up credentials

Create a Linux user that you want to give access to Samba shares.

 

Create a Samba account with the same username as the Linux user.

sudo pdbedit -a -u samba_user

 

Change samba password at any time if needed.

sudo smbpasswd samba_user

 

Start samba services.

sudo service smbd start

 

Restart Samba services.

sudo service smbd restart

Restart after modifying Samba configuration file for the changes to take effect.

 

Quick Reference

sudo apt-get install samba

Configure Samba shares and optionally configure Samba home share and Samba public share.

testparm

Create a Linux user that you want to give access to Samba shares.

sudo pdbedit -a -u samba_user
sudo smbpasswd samba_user
sudo service smbd start
sudo service smbd restart

dom