2 minutes
CentOS Samba Shares
Today I wanted to share some files between 2 of my Digital Ocean droplets and I thought it would be a fantastic time to look at making a Samba share on CentOS to make things easier.
So the first step is to actually install Samba which can be done by using:
Once Samba is installed you just need to edit the /etc/samba/smb.conf
to add in the directory you want to share. I made a new user just for this one off set up which I will go over below.
First create a new user with a directory and set a password:
Now we need to edit the smb.conf using nano / vi or any other editor and add the information below to the bottom of the file:
|
Once this has been done you need to restart the service with:
Now on the other server you can make a directory under /mnt and mount the share:
If you have selinux enabled there are some extra steps needed, You can see if it is enabled by running sestatus.
Another issue you could run into is the password not being accepted, There is a simple fix for this as well.