Linux introduction Samba service construction and Configuration

Source: Internet
Author: User
Article Title: how to set up and configure the Samba service in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

The environment we want to implement today is: if the company has three departments: finance, technology, and leadership, we have created three user groups: caiwu, network, and lingdao;

There are two users in each of the three departments. The created users are caiwu01, caiwu02, network01, network02, lingdao01, and lingdao02.

Then, we create the corresponding directories and access permissions for the company's specific circumstances. Through the following example, we hope that you can flexibly apply samba security permissions in your work to set up your samba file server.

1. First, the server uses user authentication. Each user can access his/her home directory, and only the user can access the home directory with full permissions, others cannot see your home directory.

2. Create a caiwu folder. If you want the Members of the caiwu group and lingdao group to see the folder, network02 can also be accessed, but only caiwu01 has the write permission.

3. Create a lindao directory. Only the leaders can access and read/write the directory, and network02 can also be accessed, but outsiders cannot see the directory.

4. Create a file exchange directory for everyone to read and write, including guest users, but everyone cannot delete others' files.

5. Create a public read-only folder named public. All users can read the contents of this folder.

Okay. Let's start with the preliminary work.

Create three groups:

# Groupadd caiwu

# Groupadd network

# Groupadd lingdao

Add a user to the relevant group:

# Useradd caiwu01-g caiwu

# Useradd caiwu02-g caiwu

# Useradd network01-g network

# Useradd network02-g network

# Useradd lingdao01-g lingdao

# Useradd lingdao02-g lingdao

Then we use the smbpasswd-a caiwu01 command to add the six accounts to the samba users respectively.

# Mkdir/home/samba

# Mkdir/home/samba/caiwu

# Mkdir/home/samba/lingdao

# Mkdir/home/samba/exchange

# Mkdir/home/samba/public

[1] [2] [3] Next page

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.