Set up the smba server and use the client in Linux. The smba Server

Source: Internet
Author: User

Set up the smba server and use the client in Linux. The smba Server

I am just a beginner. I have encountered many problems in the process of configuring smba, and the online tutorials are not quite complete. Therefore, I will write a complete article here for your convenience.


1. First, find the smb-related service programs in the Add/delete software library. Generally, they are automatically installed.


2. Click the application ----> system Tool -------> terminal (application -------> system ----> terminal) and use su to escalate permissions to the root administrator.

[Root @ bogon morningsun] # The # appears, which is under the root permission.

3. Modify the smba configuration file, enter cd/etc/samba to the directory, and find the configuration file.


4. Use vim smb. conf to open the configuration file. Before that, back up the configuration file, just in case.

5. modify the configuration file as follows: (you do not need to enter a password here. If you need to log on, you can search for it online)

Change location: [global]
Security = share

Add the following content at the end of the file:

[Myweb]
Path =/var/www/html
Comment = fsd
Public = yes
Writable = yes
Browseable = yes

The path is the shared path, the comment is the open content, and the rest are easy to understand.

Then change security under Standalone Server Options to security = share.

Save the file and exit.

6. Return to the terminal, enter service smb start to start the service, and check the running status of service smb status.

7. Modify selinux to terminate the service. The operation is as follows:

View SELinux status:

1./usr/sbin/sestatus-v # If The SELinux status parameter is enabled, it is enabled.

SELinux status: enabled

2. getenforce # You can also use this command to check

Disable SELinux:

1. temporarily shut down (no need to restart the machine ):

Setenforce 0 # Set SELinux to permissive Mode

# Setenforce 1 Set SELinux to enforcing Mode

2. to modify the configuration file, restart the machine:

Modify the/etc/selinux/config file

Change SELINUX = enforcing to SELINUX = disabled

Restart the machine.

8. In the window, press ctrl + R to open the run box and enter \ 192. 168. *. * (the address of your VM can be viewed using the command ifconfig .) The Virtual Machine directory can be shared. So far, the entire installation process is complete.

@ Author: zhaohao

@ Name: distant stars


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.