First of all, you have to get connected to your server via shell, and make sure to install the Samba packages:
yum install cups-libs samba samba-common
Edit the smb.conf file:
You are advised to see the following lines in the [global] section:
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.
security = user
passdb backend = tdbsam
This will allow the users of Linux system to log in to the Samba server.
Now, make the system startup links for Samba and begin it:
chkconfig --levels 235 smb on
Adding Samba Shares
Now, you have to include a share so that all the users can access it.
Set up the directory for the purpose of sharing wp-content/uploads and change the group to the users group:
mkdir -p /home/shares/allusers
chown -R root:users /home/shares/allusers/
chmod -R ug+rwx,o+rx-w /home/shares/allusers/
Write the following lines at the end of the file /etc/samba/smb.conf
comment = All Users
path = /home/shares/allusers
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
writable = yes
In order to allow all users to read and write to their home directories through Samba, include the following lines to /etc/samba/smb.conf:
comment = Home Directories
browseable = no
valid users = %S
writable = yes
create mask = 0700
directory mask = 0700
After that restart Samba:
Adding and Managing Users
Now take an example, and add a user with the name of tom. You are allowed to add many users as you want by following the same procedure. All you need to replace the username tom with the required username in the commands.
useradd tom -m -G users
Now create a password for user tom in the Linux database. If you are unable to log with the user tom into the Linux system, then skip this step.
Now type the password for the new user. After that add the user to the Samba user database:
smbpasswd -a tom