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

2010-4-12 22:00 3493 8 8 分类: 软件与OS

ubuntu 9.04 samba配置实验<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />


原想通过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/b37bfb66acd1b42caa<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />184c32.html

PARTNER CONTENT

文章评论0条评论)

登录后参与讨论
EE直播间
更多
我要评论
0
8
关闭 站长推荐上一条 /3 下一条