Achieve samba read/write splitting

Source: Internet
Author: User
1. create a read/write account & nbsp; useraddwriter # An account with an empty password & nbsp; passwdwriter # set a password for the new user & nbsp; cd/usr/local/samba/bin & nbsp ;. /smbpasswd-awriter # grant the password of the webmaster user Samba Server & nbsp ;. /smbpas 1. create a read/write account
 
Useradd writer # The generated password is an empty account.
Passwd writer # set a password for the new user
Cd/usr/local/samba/bin
./Smbpasswd-a writer # authorize the password of the webmaster user Samba Server
./Smbpasswd-a reader
2. modify the samba configuration file in/etc.
 
Security = user
Encrypt passwords = yes
Smb passwd file =/usr/local/samba/lib/smbpasswd
[WriterShare]
Comment = Shared Folder with username and password
Path =/data/share
Public = yes
Writable = yes
Valid users = writer
Create mask = 0664
Directory mask = 0775
Available = yes
Browseable = yes
[ReaderShare]
Comment = Shared Folder with username and password
Path =/data/share
Public = yes
Writable = no
Valid users = reader
Create mask = 0700
Directory mask = 0700
Available = yes
Browseable = yes
3. restart the samba service.

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.