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"