Disable SELinuxFor the sake of simplicity and saving time, we will be disabling SELinux, which isn’t recommended. We urge you to learn how SELinux works and to set it up accordingly after getting samba working successfully.
This will disable SELinux from being enabled on boot:vi /etc/selinux/configChange “SELINUX=enforcing” to “SELINUX=disabled”
Run this to immediately disable SELinux without rebooting:setenforce 0
Allows Samba Ports in IptablesChange 10.0.0.0/24 to the subnet you wish to allow access to your samba serverIptables -A INPUT -s 10.0.0.0/24 -p udp –dport 137 -j ACCEPTIptables -A INPUT -s 10.0.0.0/24 -p udp –dport 137 -j ACCEPTIptables -A INPUT -s 10.0.0.0/24 -p udp –dport 137 -j ACCEPTIptables -A INPUT -s 10.0.0.0/24 -p udp –dport 137 -j ACCEPTService iptables save
Install Sambayum install samba samba-client samba-common
Set Samba to start on bootchkconfig smb onchkconfig nmb on
Create a samba useruseradd sambagroupadd sambagroupusermod -a -G sambagroup samba
Create the share directorymkdir /home/samba/private
Give the share directory the correct permissionschown -R samba:sambagroup /home/samba/privatechmod -R 0770 /home/samba/private
Backup the default smb configmv /etc/samba/smb.conf /etc/samba/smb.conf.bak
Edit the smb configvi /etc/samba/smb.conf
Add the following and adjust how you see fit:[global]workgroup = WORKGROUPsecurity = sharemap to guest = bad user[Secure]path = /home/samba/privatevalid users = @sambagroupguest ok = nowritable = yesbrowsable = yes
Start Sambaservice smb startservice nmb start