Chinaunix首页 | 论坛 | 博客
  • 博客访问: 397388
  • 博文数量: 115
  • 博客积分: 2501
  • 博客等级: 少校
  • 技术积分: 1009
  • 用 户 组: 普通用户
  • 注册时间: 2009-09-23 17:05
文章分类

全部博文(115)

文章存档

2011年(2)

2010年(86)

2009年(27)

我的朋友

分类: LINUX

2010-04-23 20:19:47

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

阅读(517) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~