Linux samba server configuration sharing tutorial

Source: Internet
Author: User


Target

1. Provide shared files by department;
2. All shared files are readable but cannot be written;
3. Shared files are maintained by dedicated personnel and can be written;

Environment
CentOS 7.2 amd64
Samba-4.2

Procedure

1. Add a system user

Useradd dongnan

2. Configure smb users

Smbpasswd-a dongnan
# Enter the password twice
New SMB password:
Retype new SMB password:
Added user dongnan.

3. Change permissions (shared read)

Chmod-R 755/home/dongnan/

4. Edit configuration

Vim/etc/samba/smb. conf
# The configuration file is similar to the following:
[Dongnan]
Comment = dongnan
Path =/home/dongnan
Public = yes
Writable = no

5. Restart the service

Systemctl restart smb

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.