Extra Story: Sharing 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 the shared directory and click Properties -> click on the sharing option in the sharing page -> drop down to select the shared object as Everyone -> click on the share button
    Insert picture description here
    Insert picture description here
    Some unsuccessful sharing needs to share this folder in advanced sharing
    Insert picture description here

3. Set up local policies

  • Open the command box -> enter secpol.msc -> select local policy
  • User rights assignment -> Deny access to this computer from the network -> Delete the Guest user
  • Security options -> network access: local account sharing and security model -> drop down to select only guest,
    delete guest user,
    Insert picture description here
    guest choice
    Insert picture description here

Two, Linux mount end

1. Scan shared directories

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

I installed Linux on a virtual machine. The IP address here is the IP address of the virtual network card 8. I won’t elaborate on how to look at it. The picture below simply marks the location.
Insert picture description here
My computer doesn’t have a password . Just press Enter and go directly.
Insert picture description here

2. Mount the shared directory

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

Insert picture description here
Insert picture description here
Insert picture description here
This is the file in the windows shared file
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_51326240/article/details/110135788