How to share files on windows to Linux (detailed explanation of pictures and texts!)

How to share files on windows to Linux

1. Windows sharing permission setting

1. Unban Guest

Right-click on My Computer and select Manage -> Local Users and Groups -> Double-click Guest user in the user item -> Cancel the account disabled option

Insert picture description here

2. Set shared directory permissions

Right click on the shared directory and click on the properties -> click on the sharing option on the sharing page -> drop down and select the shared object as Everyone -> click on the share button
Insert picture description here
Insert picture description here
Insert picture description here

Insert picture description here
If the sharing is not successful, it is because some unsuccessful sharing needs to share this folder in advanced sharing
Insert picture description here
Insert picture description here

3. Set the local policy

Open the command box -> enter secpol.msc -> select the local policy
User permission assignment -> deny access to this computer from the network -> delete the guest user
security option -> network access: local account sharing and security model -> drop-down selection
Guest only Delete the Guest user
Insert picture description here
User rights allocation
Insert picture description here
Security option configuration
Insert picture description here
View the IP corresponding to the virtual network card in the windows host.
Insert picture description here
I installed Linux with a virtual machine. The IP address here is the IP address of the virtual network card 8.
Insert picture description here

Two, Linux mount end

1. Scan shared directories

smbclient -L//192.168.2.1/    #windows端的IP地址
不需要输入密码直接回车

If an error is reported here, please refer to my error collection, smbclient reports an error when accessing Windows shared files
Insert picture description here

2. Mount the shared directory

yum install -y cifs-utils
mkdir /data
mount.cifs //192.168.2.1/gx /data
不需要输入密码直接回车
df -h
ls /data

If you get an error when mounting, please refer to my other blog: Mount error(112): Host is down when mounting a Windows shared directory on Linux
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_35456705/article/details/114945210