debian文件共享服务器,通过samba服务器在Debian/Ubuntu和Windows下共享目录

而通过samba服务器来设置Debian和Windows间共享目录更方便、更高效

1、首先,下载安装samba服务器

# apt-get install samba

2、在debian下创建一个共享目录,我这里为/mnt/shared

#mkdir  /mnt/shared

3、配置samba服务器的配置文件/etc/samba/smb.conf

在最后添加:

[shared]

comment ='Share for work'

path= /mnt/shared

guest ok = yes

public= yes

writable = yes

create mask = 0777

directory mask = 0777

browseable = yes

available = yes同时,安全选项改为如下语句,否则在windows下登陆时需要验证:

# "security = user" is always a good idea. This will require a Unix account

# in this server for every user accessing the server. See

# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html

# in the samba-doc package for details.

security = share

4、这样,samba服务器就配置好了,下面进行验证:

我的PC windows IP地址是 192.168.1.108

debian的IP地址是:192.168.1.111

samba共享目录是:/mnt/shared

在Windows下有两种方式可以进入:

第一种方式:

进入网上邻居-->工作组-->workgroup工作组

(要是默认进入mshome工作组,那么先切换到上层目录,找到workgroup工作组进入)

可以看到有debian的共享目录,这样可以进入访问了

9efeb9b0e163d65d76b42cfabc1f97a2.png

113c5862b54eda8f513110fabdabd9cc.png

另一种方式:

点击开始运行,输入\\192.168.1.111\shared,也可以进入共享目录

97427f3d8ebec90f549d709e62d86c4b.png

5、还可以将共享目录映射为一个硬盘:

ab48bf299e082e97be0240aa69c4237b.png

0d051b2c587485a82fa747b0d3fc9fc5.png

点击完成,这样就可以像访问windows下的一个盘一样访问debian下的共享目录了0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值