Samba is an SMB/CIFS networking protocol is used for providing file and print services for Microsoft clients. Samba also can be used as part of Active Directory domain. Samba uses TCP/IP protocol for communication.
I am using CentOS 6.3 for below installation instructions, But below steps will also work on CentOS 5 as well.
Step 1 – Install Samba
sudo yum install samba ## CentOS and Redhat systems sudo dnf install samba ## Fedora 22+ systems sudo apt install samba ## Debian based systems
Step 2 – Create Account for Authentication
Now create a system account for authentication to access samba shares.
useradd marc passwd marc
Also add this account in smbpasswd file to be used by samba authentication.
smbpasswd -a marc
Step 3 – Configure Share Directory
Now you will required a directory to be access with samba.
Add below entry in Samba configuration file /etc/samba/smb.conf at the bottom.
[shared] comment = Public Stuff path = /opt/shared public = yes writable = yes valid users = marc write list = marc
Step 4 – Restart Samba Service
Restart smb and nmb services of your system.
systemctl restart smbd.service systemctl restart nmbd.service
Step 5 – Access Samba Share
To test your setup, you need to access shared location from windows system. Open run window on your Windows operating system and type below.
Change IP with your samba server IP address. If will prompt for authentication. To authorize use account created in