Linux Simple configuration Samba service __linux

Source: Internet
Author: User


The typical Linux Samba service is all loaded and goes directly into the/etc/samba directory.

Open smb.conf,

[Gloabal] Inside is some global options, affecting all the sharing, the main to modify is the security= option, the default is Security=user that is the user name authentication login, can also be changed to share, do not need to verify.

General has defined some shares, such as [home], [public], and so on, we can add ourselves a

[Test]

Comment = Test share

browseable = yes

writeable = yes

Valid users = Tester

Path =/test/

Guest OK = No

Here's [test] is the share name, access to use Ip/test to access, Commnet is a note, valid users to represent a valid user, path is a shared path, guest OK = no means guset users can not access, writeable = yes indicates writable.


So the next thing to do is create tester users, Samba users must first be the system user, so first add a system user with Useradd tester, then add to the Samba user with Smbpasswd-a tester, and set the password.


You can then start the SMB service,/ETC/INIT.D/SMB restart


Note: After you set the writable, you don't have to be able to write it. Shared inside write, the premise is tester system users must have the/test path has writable permissions. For convenience, the root user is the best, and if you want to log in as root, first remove the root line from the smbusers and then smbpasswd-a root to set the SMB password for root.


Installation and configuration of Samba server under CentOS6.4 http://www.cnblogs.com/xiaoluo501395377/archive/2013/04/06/3001863.html


Note: There is a problem configuring samba today, all configurations are the same as before, the username is root, but can not be read after the end of the whole day did not understand why. Later found that the share can only see the folder can not see the file, online search is SELinux, Getenforce looked at is enforcing state, call the command Setforce 0 shut it down after the good (if you want permanent, modify/etc/ Selinux/config file SELinux is changed to disable or permissive, but modifying the configuration file to reboot the system will take effect.  selinux full Name Security Enhanced Linux (Secure hardening Linux) is an implementation of MAC (mandatory access control, mandatory access controls system), The goal is to specify which resources (files, network ports, and so on) a process can access.  

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.