ubuntu 9.04 下samba配置实验
原想通过rdesktop实现host和client之间的文件共享,可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