Linux 使用 mount 挂载 Windows 共享文件夹 - 简书
2023-7-4
| 2023-7-14
0  |  0 分钟
type
status
date
Jul 4, 2023 02:36 PM
slug
summary
tags
category
icon
password
准备实验环境:Windows 7 本地 ip 是 192.168.10.30, linux 服务器本地 ip 是 192.168.10.10, 关掉 Windows7 的防火墙。实现 win7 主机与 linux 主机互联互通。
notion image
notion image
实验目的:在 Linux 系统上能匿名共享 Windows 文件夹
1)Windows7 上的准备工作
  1. 解禁 Guest 账户
右击计算机,选择管理 —- 本地用户和组 —- 用户,右击 Guest, 选择属性,将账户已禁用勾掉。
notion image
  1. 在本地策略上修改用户权限分配和安全选项
输入 “secpol.msc” 命令打开本地安全策略向导
第一步选择本地策略 —- 用户权限分配 —- 拒绝从网络访问这台计算机,双击打开,将 Guest 账户删除,单击确定。
notion image
第二步选择本地策略 —- 安全选项 —- 网络访问:本地账户的共享和安全模型,双击打开,设置为仅来宾模式,单击确定。
notion image
  1. 在 Windows 下面的文件夹 linuxtools 设置共享
右键需要共享的文件夹,选择共享,添加 everyone 用户,单击共享。
notion image
notion image
notion image
2)Linux 服务器上的操作
  1. 扫描 Windows 共享文件。
notion image
  1. 在 Linux 系统上创建一个挂载目录 / abc, 使挂载上去,再用 df 命令查看是否挂载成功。
notion image
这里是以 6 版本为例,7 版本需要注意的是可能 mount.cifs 工具没有,需要自行安装,可以执行 yum install cifs-utils 命令,对于 yum 仓库的创建详细步骤参考 https://blog.51cto.com/11134648/2103388 这篇博客有介绍 > 本文由简悦 SimpRead 转码
技术折腾
  • samba
  • Linux mount 指令访问 Windows 网络共享 - Linux Wiki
    目录