Ubuntu下配置samba实现文件夹共享

本文介绍如何在Linux系统中安装和配置Samba服务,包括安装Samba软件包、创建共享目录、配置Samba参数文件、创建Samba账户及重启Samba服务等步骤。

一. samba的安装:

<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->sudoapt-getinsallsamba
sudoapt-getinstallsmbfs

. 创建共享目录:

<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->mkdir/home/phinecos/share
soduchmod
777/home/phinecos/share

三. 创建Samba配置文件:

1. 保存现有的配置文件

<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->sudocp/etc/samba/smb.conf/etc/samba/smb.conf.bak

2. 修改现配置文件

<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->sudogedit/etc/samba/smb.conf

smb.conf最后添加

<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->[share]
path
=/home/phinecos/share
available
=yes
browsealbe
=yes
public=yes
writable
=yes

四. 创建samba帐户

<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->sudotouch/etc/samba/smbpasswd
sudosmbpasswd
-aphinecos

然后会要求你输入samba帐户的密码

[如果没有第四步,当你登录时会提示 session setup failed: NT_STATUS_LOGON_FAILURE

五. 重启samba服务器

<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->sudo/etc/init.d/sambarestart

. 测试

<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->smbclient-L//localhost/share

七,使用

<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->可以到windows下输入ip使用了,在文件夹处输入"//"+"Ubuntu机器的ip或主机名"+"//"+"share"

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值