Install samba in CentOS 6.5, centos6.5samba
1. Install software
yum install samba samba-client samba-swat
2. Modify the samba configuration file
vi /etc/samba/smb.conf
Modify
workgroup = hitachigst.globalnetbios name = hitachigst.global[all]comment = Public Stuffpath = /home/lbl/allavailable = yesbrowseable = yespublic = yeswritable = yesprintable = nowrite list = lblguest ok = no
3. Add samba users
touch /etc/samba/smbpasswdsmbpasswd -a lbl
4. Modify the access permission of the shared directory
chcon -R -t samba_share_t /home/lbl/allchmod 777 -R /home/lbl/all
5. Modify iptables to open the samba Port
vi /etc/sysconfig/iptables
Add in the next line of "ACCEPT"
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT-A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -j ACCEPT-A INPUT -p udp -m udp --dport 137 -j ACCEPT-A INPUT -p udp -m udp --dport 138 -j ACCEPT
Restart service
/etc/rc.d/init.d/iptables restart
6. Restart the samba service.
/etc/init.d/smb restart/etc/init.d/nmb restart