How to install Samba on Arch Linux 2017

install samba on arch linux

Arch Linux Tutorial – Hello everyone, today we will show you how to install Samba on Arch Linux 2017. As you know, Samba is a special software that communicate between Linux and Windows workstation where lets us to share files and folders between Linux and Windows OS. With Samba, we can turn Arch Linux into a powerful File Server for our network. I am currently testing my Arch Linux for several purposes such as:

What you need ?

On this tutorial, you will need a working Arch Linux with internet connection. Most steps shown here were done via Terminal, so lets get our hands dirty. You may interested on the following articles to get started:

Steps to install Samba On Arch Linux 2017

Install Samba and required packages

sudo pacman -S samba smbclient

Create new smb.conf

cd /etc/samba
sudo cp smb.conf.default smb.conf

Add new Shares

The default configuration found in smb.conf should works for most cases. Now we need to add a new share.

sudo nano /etc/samba/smb.conf

Now add the following lines to the bottom of the smb.conf. Please change it with your own.

[Share01]
path = /shares/share01
writable = yes
browseable = yes
create mask = 0700
directory mask = 0700
read only = no
guest ok = no

Create new samba group and samba user

#Create a new group called sambausers
sudo groupadd -r sambausers

#Add fitri to the sambausers group
sudo gpasswd sambausers -a fitri

#create new password for user fitri
sudo smbpasswd -a fitri

The command will add user fitri to access the Samba shares

Create the Directory

As you see on my Share01 above, the path is /shares/share01. But, the actual directory does not exist yet. We can create it now

#Create the directory
sudo mkdir -p /shares/share01

#change the owner to sambausers
sudo chown -R root:sambausers /shares/share01

#Give permission of the share
sudo chmod 1770 /shares/share01

Now we can restart Samba

sudo systemctl restart smbd

At this point, our Samba server is ready and we can access it from other computer.

How to install Samba on Arch Linux 2017

Thanks for reading this how to install Samba on Arch Linux 2017. Please share this article if you think its useful.

1 Comment

Leave a Reply

Your email address will not be published.


*