Common Enterprise IT Support Skills "2, Samba shared Folders"

Source: Internet
Author: User

Samba shared folders, compared to Window's own comparison: Open source, secure

Recommended installation SAMBA4, good compatibility

1. Installing Samba#yum-y install samba4 samba4-client 2. Back up the Samba configuration file#Cp/etc/samba/smb.conf/etc/samba/smb.conf.bak 3. Add a shared directorychange Security = user to Security = shareat the bottom of the add[public]Comment=publicPath=/sambaPublic=yesWritable=yes4. View Nobody user rights (#id nobody), create a shared directory, grant permissions#Mkdir/samba #Chown-r nobody./samba #chmod 777/samba #Chcon-r-T Samba_share_t/samba 7. Set the Samba service to boot automatically#chkconfig SMB on8. Restart Samba Services#/ETC/INIT.D/SMB restart  If open iptables firewall, need to add releaseReference-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 ACCEPTBe sure to-A input-p udp-m UDP--dport 137-j ACCEPT-A input-p udp-m UDP--dport 138-j ACCEPT-A input-p udp-m UDP--dport 139-j ACCEPT   Create a shared folder example, in the configuration file support Chinese, use the file directory properties to restrict access, from the following 777 and 770 can see the role vi/etc/samba/smb.conf [Platform Development Department]Path =/samba/Platform Development DepartmentRead Only = NoGuest OK = YesPublic = yeswritable = yesForce Create mode = 0777Force Directory mode = 0777[Network Engineering Dept.]Path =/samba/Network Engineering DepartmentRead Only = Nobrowseable = YesWrite list = @nocForce Create mode = 0770Force Directory mode = 0770 [It sharing]Path =/samba/itRead Only = NoGuest OK = YesPublic = yeswritable = yesForce Create mode = 0777Force Directory mode = 0777 [Ministry of Commerce]Path =/samba/businessRead Only = NoWrite list = @businessForce Create mode = 0770Force Directory mode = 0770  [Financial Planning Center]Path =/samba/financeRead Only = NoWrite list = @financeForce Create mode = 0770Force Directory mode = 0770 etc.  create the corresponding folder directory, take the network engineering Department for example, the Linux directory supports Chinese mkdir/samba/Network Engineering Dept. Create a normal usergroupadd NOCadduser-g NOC NOCPass NOCEnter the server user login password Assign directory Permissionschown-r noc:noc/samba/Network Engineering Dept.chmod 770-r/samba/Network Engineering Dept. set the password for the Samba end user login, which is not the same as that of the above userssmbpasswd-a NOC Complete

Common Enterprise IT Support Skills "2, Samba shared Folders"

Related Article

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.