一. samba的安装:
<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->sudoapt-getinsallsamba
sudoapt-getinstallsmbfs
sudoapt-getinstallsmbfs
二. 创建共享目录:
<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->mkdir/home/phinecos/share
soduchmod777/home/phinecos/share
soduchmod777/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
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
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"