How to Create Network Share via Samba on Linux
Abstract: Step 3 – Configure Share Directory Now you will required a directory to be access with samba. mkdir /opt/sharedStep 2 – Create Account for Authenticat
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.
sudo yum install samba ## CentOS and Redhat systems sudo dnf install samba ## Fedora 22+ systems sudo apt install samba ## Debian based systemsStep 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 marcStep 3 – Configure Share Directory
Now you will required a directory to be access with samba.
mkdir /opt/shared
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 = marcStep 4 – Restart Samba Service
Restart smb and nmb services of your system.
systemctl restart smbd.service systemctl restart nmbd.serviceStep 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.
//192.168.1.90/publicshare/
Change IP with your samba server IP address. If will prompt for authentication. To authorize use account created in
step 2.