CentOS 6.3 Install Samba share (GO)

Source: Internet
Author: User

PHP environment under Linux, but the development of the use of Windows, so I used Samba to share a directory of Linux, and then mapping on Windows, so that you can directly under Windows to edit the files on Linux

First of all, I installed the Samba software, I use the Yum installation, because this is really convenient, and personally feel that this version is not very high requirements, it can not be compiled with the source of the installation

First check if there is a Samba software installed, I use the CentOS 6.3 64bit,

Rpm-qa | grep Samba

samba-common-3.5.10-125.el6.i686samba-client-3.5.10-125.el6.i686samba-3.5.10-125.el6.i686samba-winbind-clients-3.5.10-125 . el6.i686

If there are so few, the instructions have been installed, if not, enter Yum-y install Samba for installation

After installation, edit the configuration file vi/etc/samba/smb.conf

The configuration file includes 4 settings segments:
[Global] setting environment options
[Homes] Set User host directory Share
[Printers] setting up printer Sharing
[Sharefiles] Setting up file sharing

[Global] Segment main option settings:
Workgroup = mygroup//specify workgroup or domain, this does not seem to be set.
Server string = Samba server Version%v//description
The hosts allow = 127.     192.168.12.192.168.13. Allow these IPs, or IP segment access, if not set, then all can be accessed
Hosts deny= 192.168.70.100//Disable these IP access
Note: The general hosts allow and hosts deny are not at the same time, if they occur at the same time, allowing priority
Log file =/var/log/samba/%m.log//The location of the log files (default is not turned on), the Diary of God and horse, do not care.
Max log size = 50//Specifies the maximum value of the log file (default is not turned on)

[Homes] Segment main option settings:
Comment = Home directories//description
browseable = no//indicates that only the user's own host directory is displayed
writable = yes/write permission

Because Samba users must be users of the system, and each system user has its own home directory, this paragraph means that the home directory has read and write permissions

The bottom is the configuration of the most important paragraph, such as I want to/blog this directory share, share display name is also called blog, so that the root user has read and write permissions, then set

[Blog]//Display the name
Path =/blog//shared paths
Valid users = root//user, must be present in the system
writable = yes/write permission

Save exit.

Execute smbpassword-a root//Add root user to Samba, then prompt for password

Smbpassword root//This is used to change the password

Then start Samba services, service SMB start

Stop can be used with service SMB stop

To set Samba to self-boot, perform chkconfig SMB on

You can enter Smbstatus to see the status of Samba

then enter \ \ Your Linux IP in the start-"run

If you can't connect, check to see if iptables has/etc/init.d/iptables status enabled.

If a large display, that means the firewall is open, either to open the port for Samba, or to turn off the iptables, I chose to close/etc/init.d/iptables stop, so much direct

Http://www.cnblogs.com/haython/archive/2013/01/14/2860430.html

CentOS 6.3 Install Samba share (GO)

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.