ubuntu 9.04 下samba配置实现linux与XP文件共享

ubuntu 9.04 samba配置实验

原想通过rdesktop实现hostclient之间的文件共享,可rdesktop的本地文件挂载实在是不理想,于是打算使用samba来实现文件共享。设置参见这篇文档

一、安装samba

$sudo apt-get install samba

二、配置samba

主要的配置文件是/etc/samba/smb.conf

1 workgroup = EXAMPLE

      security = user

2、在smb.conf最后增加下面一段内容

[share]

    comment = Ubuntu File Server Share

    path = /srv/samba/share

    browsable = yes

    guest ok = yes

    read only = no

    create mask = 0755

3、建立共享目录

sudo mkdir -p /srv/samba/share

sudo chown nobody.nogroup /srv/samba/share/

4、重新启动samba

sudo /etc/init.d/samba restart

现在已经可以通过//ip/链接到samba上面

 

继续配置要求用户名密码访问

5、安装系统用户和smb用户同步的工具

sudo apt-get install libpam-smbpass

6、编辑/etc/samba/smb.conf

Edit /etc/samba/smb.conf, and in the [share] section change:

guest ok = no

Finally, restart Samba for the new settings to take effect:

sudo /etc/init.d/samba restart

 

    read list = @qa

    write list = @sysadmin, vincent

Another possible Samba permission is to declare administrative permissions to a particular shared resource. Users having administrative permissions may read, write, or modify any information contained in the resource the user has been given explicit administrative permissions to.

For example, if you wanted to give the user melissa administrative permissions to the share example, you would edit the /etc/samba/smb.conf file, and add the following line under the [share] entry:

admin users = melissa

After editing /etc/samba/smb.conf, restart Samba for the changes to take effect:

sudo /etc/init.d/samba restart

write list = @sysadmin, vincent

Another possible Samba permission is to declare administrative permissions to a particular shared resource. Users having administrative permissions may read, write, or modify any information contained in the resource the user has been given explicit administrative permissions to.

For example, if you wanted to give the user melissa administrative permissions to the share example, you would edit the /etc/samba/smb.conf file, and add the following line under the [share] entry:

admin users = melissa

After editing /etc/samba/smb.conf, restart Samba for the changes to take effect:

sudo /etc/init.d/samba restart

 

转自:http://hi.baidu.com/bailiangcn/blog/item/b37bfb66acd1b42caa184c32.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值