Install samba in CentOS 6.5, centos6.5samba

Source: Internet
Author: User

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

  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.