Simple configuration of SAMBA service in Linux

Source: Internet
Author: User

Generally, the Linux SAMBA service is installed and directly enters the/etc/samba directory.

Open smb. conf,

[Gloabal] contains some global options that affect all sharing. The main option to be modified is Security =. the default option is Security = user, that is, Username Authentication logon. You can also change it to share, verification is not required.

We have defined some shares, such as [home] and [public]. We can add one by ourselves.

[Test]

Comment = test share

Browseable = Yes

Writeable = Yes

Valid users = Tester

Path =/test/

Guest OK = No

Here, [test] is the shared name. IP Address/test is used for access, commnet is the annotation, valid users indicates a valid user, and path indicates a shared path, guest OK = No indicates that the guset user cannot access it, And writeable = Yes indicates that it is writable.

So what needs to be done next is to create a tester user. Samba users must first be system users. Therefore, first use useradd tester to add a system user, and then use smbpasswd-a tester to add a samba user, and set the password.

Then start the smb service and you can use it./etc/init. d/SMB restart

Note: It is not necessarily possible to write data in the sub-shared file after the write-ability is set. The premise is that the System user of tester must have the write permission on the/test path. For convenience, the root user is the best. If you want to log on as root, delete the root row in smbusers first, then smbpasswd-a root can set the root smb password.

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.