Install and configure the Samba server in CentOS 7, centossamba

Source: Internet
Author: User

Install and configure the Samba server in CentOS 7, centossamba
Suppose we have such a scenario
Share Name path permission everyone DOC/smb/docs all personnel including guests can access RDDOCS/smb/tech only allow users in specific groups to read and write access
The group name is RD. Currently, there are two people in the specified group: quwenzhe and zhanghongjie.
1. Install SambaYum-y install samba-client samba-common2. Create a shared directory (assuming files under the shared/smb directory )#Mkdir-p/smb/docs#Mkdir-p/smb/tech3. Configure Kernel Parameters #Ulimit-n 16384#Vi/etc/security/limits. confAdd the following content at the end*-Nofile 163844. Configure the Samba server #Vi/etc/samba/smb. confDelete all original content (run the vi command to delete all content: Use G to go to the end of the file --> ESC -->: 1,. d) and add the following content:

[global]  workgroup=BIGCLOUD  netbios name=ZZSRV2  server string=Samba Server  #security=share  security=user  map to guest = Bad User[SHAREDOCS]  path=/smb/docs  readonly=yes  browseable=yes  guest ok=yes[RDDOCS]  path = /smb/tech/  public = no  writable = yes  write list = @RD  validusers = @RD
5. Create a user and assign permissions. // create an operating system user # Useradd quwenzhe# Useradd zhanghongjie# Useradd RD// Modify the user group # Usermod-a-g rd quwenzhe# Usermod-a-g rd zhanghongjie// Create a SAMBA user # Smbpasswd-a quwenzhe# Smbpasswd-a zhanghongjie// Modify directory permissions # Chown RD: RD/smb/tech/# Chmod 770/smb/tech// View service status # Ll-d/smb/tech
6. Start the Samba server # Systemctl restart smb# Systemctl enable smb# Systemctl status smb
7. Test connectivity // test on Linux # Smbclient-L localhost-U quwenzhe@123456
// Input in the test run window on Windows \ 192.168.24.244
Directly upload the target file to the target folder for resource sharing. 8. Access the Samba server in Linux. Smbclient // 192.168.24.244/rddocs-U quwenzhe
At this point, we have completed the installation and configuration of the Samba server, windows Access to the Samba server, and Linux access to the Samba server. I hope my explanation can help you make progress.

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.