Leonard

In theory, there is no difference between theory and practice. But, in practice, there is.

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

转载自:http://www.51testing.com/?145083/action_viewspace_itemid_65596.html

 

一. Samba的安装:

# sudo apt-get install samba

# sudo apt-get install smbfs

二. 创建共享目录:

# mkdir /home/leonard/share

# sodu chmod 777 /home/leonard/share

三. 创建Samba配置文件:

1. 保存现有的配置文件

# sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.bak

2. 创建新的Samba配置文件

# sodu vim /etc/samba/smb.conf

; ############### smb.conf #######################

[global]

    ; 创建工作组   

    workgroup = MYGROUP

    ; 安全模式, 我们设置最低安全级别

    security = share

    ; 是否允许guest用户访问

    guest ok = yes

[share]

    ; 共享文件夹路径

    path = /home/leonard/share

    ; 读权限

    browseable = yes

    ; 写权限

    writeable = yes

四. 测试文件配置结果

# testparm

五. 重启Samba服务

# /etc/init.d/samba restart

六. 退出重新登陆或者重启机器

七. 测试登陆

# smbclient -L //localhost/share

从远程的机子上测试:

# smbclient  //<samba_server_ip>/share

成功咯! :-)

八. 参考资料

在Ubuntu中设置samba共享可读写文件夹:
http://forum.ubuntu.org.cn/about20852.html&highlight=samba
posted on 2012-10-18 20:46  Leonard Tse  阅读(164)  评论(0编辑  收藏  举报