How to configure Samba in centos7?

Turn off the windows firewall

Step 1:
Go to the control panel -> click on System and Security -> windows Defender firewall -> click on and off the firewall
Insert picture description here
and then click OK

Configure samba

Step 1:
Install samba

Insert picture description here
Step 2:
Create a user: You can use the previous user, or you can re-create the user. I am using the original user here. Here is how to create a user.
Insert picture description here
Step 3:
Configure samba service
1. Enter the following code to configure samba service.
Insert picture description here
2. Modify the contents, directly delete all the contents of the original file, and paste the following code into it, just modify the following, change luo to your own user name, and /home/luo to your defined user path:
Insert picture description here

[global]
        workgroup = WORKGROUP
netbios name=VMSmbShare
server string=Linux Smaba Server
        security = user

        passdb backend = tdbsam

        printing = cups 
        printcap name = cups
        load printers = yes
        cups options = raw 
    
    
[luo]
        comment =Home Directories  
        path = /home/luo
        public=yes  
        writeable = yes 
        available = yes
        browseable =yes
read only =No 
inherit acls=Yes

Step 3:
Reload smb.conf
Insert picture description here
Step 4:
Turn off the Linux firewall
Insert picture description here
Step 5
sentence 0
Step 6:
Apply for a samba account:
If you have not applied for a samba account, it will show that the password is incorrectly entered when connecting.
Where luo is my user name, you must modify it to a user defined by yourself.
Insert picture description here
At this point we have completed all the steps, and then just connect.

Connect to samba

Step 1:
Enter ifconfig to check your ip:
Insert picture description here
Step 2:
In your windows, hold down the windows key + r to open cmd

Insert picture description here
Finally:
Insert picture description here

if you see this, congratulations, the configuration is successful.

Guess you like

Origin blog.csdn.net/qq_45137584/article/details/106231041