Windows sharing permission setting
1. Operation steps
Windows端共享权限设定:
1.解禁Guest
右击我的电脑选择管理-->本地用户和组-->在用户项中双击Guest用户-->取消账号已禁用选项
2.设置共享目录权限
右击共享目录点属性-->在共享页面中点击共享选项-->下拉选择共享对象为Everyone-->点击共享按钮
3.设置本地策略
打开命令框-->输入secpol.msc-->选择本地策略
用户权限分配-->拒绝从网络访问这台计算机-->把Guest用户删除
安全选项-->网络访问:本地账户的共享和安全模型-->下拉选择仅来宾
Linux挂载端:
1.扫描共享目录
smbclient -L //192.168.80.1/ #Windows端的IP地址
不需要输入密码直接回车
2.挂载共享目录
yum install -y cifs-utils
mkdir /data
mount.cifs //192.168.80.1/share /data
不需要输入密码直接回车
df -h
ls /data
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
2. Set shared directory permissions
Right-click the shared directory and click the properties -> click on the sharing option in the sharing page -> drop down and select the shared object as Everyone -> click the share button
3. Set up local policies
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 Guests only
[root@localhost ~]# systemctl stop firewalld.service
[root@localhost ~]# setenforce 0
4. View the network segment
5. linux mount end, scan the shared directory
[root@localhost ~]# smbclient -L //192.168.133.1/
Enter SAMBA\root's password:
An error occurred:
protocol negotiation failed: NT_STATUS_CONNECTION_RESET
At this time, you can't enter the view interface, enter the solution:
[root@localhost ~]# vi /etc/samba/smb.conf
enter:
6. Mount the shared directory
[root@localhost ~]# yum install -y cifs-utils ######挂载共享目录
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.bfsu.edu.cn
* extras: mirrors.163.com
* updates: mirrors.ustc.edu.cn
软件包 cifs-utils-6.2-10.el7.x86_64 已安装并且是最新版本
无须任何处理
[root@localhost ~]#
Enter instructions to create a directory:
[root@localhost ~]# mkdir /data
An error was reported again:
Solution:
1. Enter control during operation:
2. This option needs to be turned on
df -h view: