⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1550.html

📁 著名的linux英雄站点的文档打包
💻 HTML
📖 第 1 页 / 共 4 页
字号:
;   valid users = fred<br>
;   path = /homes/fred<br>
;   printer = freds_printer<br>
;   public = no<br>
;   writable = no<br>
;   printable = yes<br>
 <br>
# A private directory, usable only by fred. Note that fred requires write<br>
# access to the directory.<br>
;[fredsdir]<br>
;   comment = Fred's Service<br>
;   path = /usr/somewhere/private<br>
;   valid users = fred<br>
;   public = no<br>
;   writable = yes<br>
;   printable = no<br>
 <br>
# a service which has a different directory for each machine that connects<br>
# this allows you to tailor configurations to incoming machines. You could<br>
# also use the %U option to tailor it by user name.<br>
# The %m gets replaced with the machine name that is connecting.<br>
;[pchome]<br>
;  comment = PC Directories<br>
;  path = /usr/pc/%m<br>
;  public = no<br>
;  writable = yes<br>
 <br>
# A publicly accessible directory, read/write to all users. Note that all files<br>
# created in the directory by users will be owned by the default user, so<br>
# any user with access can delete any other user's files. Obviously this<br>
# directory must be writable by the default user. Another user could of course<br>
# be specified, in which case all files would be owned by that user instead.<br>
;[public]<br>
;   path = /usr/somewhere/else/public<br>
;   public = yes<br>
;   only guest = yes<br>
;   writable = yes<br>
;   printable = no<br>
 <br>
# The following two entries demonstrate how to share a directory so that two<br>
# users can place files there that will be owned by the specific users. In this<br>
# setup, the directory should be writable by both users and should have the<br>
# sticky bit set on it to prevent abuse. Obviously this could be extended to<br>
# as many users as required.<br>
;[myshare]<br>
;   comment = Mary's and Fred's stuff<br>
;   path = /usr/somewhere/shared<br>
;   valid users = mary fred<br>
;   public = no<br>
;   writable = yes<br>
;   printable = no<br>
;   create mask = 0765<br>
  此后,预设smb.conf中给出了一些设定各种共享档案资源、打印机资源的例子,例如
设置特定打印机的 [fredprn],设置私人档案共享资源的[freddir]和[myshare],使用宏
为多个用户设置共享的[pchome],提供公共访问的[public]和[tmp],FreeBSD的管理员可
以根据具体情况,根据这些设置例子设置相应的共享资源,并设置相应的访问权限,以保
护档案系统不被非法访问。<br>
  需要注意的是,当使用valid user用来设置合法访问用户时,或者使用wirte list定
义具备写权限的用户时,都可以使用@staff的形式使用Unix的组名,这样凡是属于该staff
组成员的用户,都会具备相应权限。<br>
  从这些例子中可以看到[global]用于设定全局参数,不会出现在资源列表中,[homes]
用于设定个人目录共享,其共享的名字映射为个人标识符而非homes,[printers]设定印表
机共享,将共享所有的印表机名字,除了这些标题的共享名字与标题不同之外,其他每个
标题都将代表一个共享资源的名字。<br>
  当更改设置之后,可以重新启动Samba服务器,提供新的共享服务了。但在重新启动服
务器之前,最好使用Samba软体包中提供的测试软体,检查一下设置是否正确。这些小工具
程序包括检查smb.conf设置的testparm,检查印表机名字的正确性的程序testprn,用于进
行NetBIOS名字解析的nmblookup等。<br>
    * 使用swat配置samba<br>
  samba 2.0提供了一个能够通过浏览器来配置samba的工具──swat。它是一个专用www
伺服器,使用inetd 来启动,然后经过认证,可以允许用户通过浏览器来配置smb.conf。
为了达到这个目的,首先要为swat分配一个 固定的端口,这个工作可以通过在
/etc/services中增加一行来完成:<br>
swat    901/tcp<br>
  出于安全的考虑,应该使用1024以下的端口,这是因为非root用户也能占用1024以上
的端口,如果使用 1024之上的端口,可能在某些情况下,普通用户就可能通过欺骗的方法
获得管理员的密码。<br>
  为了启动swat,需要在inetd.conf中增加一个入口,并重起inetd:<br>
swat  stream    tcp  nowait  	root /usr/local/sbin/swat     swat<br>
  然后就能使用Netscape等浏览器来配置samba了,为了避免认证密码通过网路传输,应
该在本地启动浏览器(并进一步可以使用tcp_wrapper提供保护)。输入URL为:
http://localhost:901 /,浏览器将提示用户名和密码对用户进行认证,可以输入任意一个
Unix用户进入swat页面,但普通用户只能读取 samba设置,而不能更改,为了设置samba,
必须使用root用户进行认证。一些功能简单的浏览器不支持浏览器方式的用户认证,就无法
使用swat设置Samba。<br>
  由于改变smb.conf对于系统安全有严重的影响,因此使用swat一定要小心。为了防止
进行swat认证时root密码被窃听,不应该在远程启动浏览器进行设置,应该在控制台或本
地安全网路内进行设置。而且一旦设置完毕,应该立即退出浏览器,因为浏览器在内存中
保存用户的认证信息,直到浏览器退出。<br>
  注意,swat将删除原有smb.conf中的全部注释,并重新安排各个设置项的位置,因此
应该在使用swat 设置之前备份原有的smb.conf。而且swat只是提供了一个容易使用的设置
界面,并不能保证设置一定就是正确的,因此还是要在理解smb.conf的基础上才能正确设置。<br>
  swat提供7个不同功能的页面,提供管理员访问。主页面HOME,提供了对Samba文档的
连接,用于管理员实时查看相关手册;GLOBALS页面提供对smb.conf中[globals]部分中的
各个参数进行设置;SHARES 用于选择、增加、删除各个共享资源,查看并更改其设置选
项;PRINTERS用于设置印表机选项;STATUS 用于检查目前Samba伺服器的状态,包括客户
电脑的连接状态和用户的连接信息,管理员可以使用它来重新启动 Samba,这样就能在更
改设置之后使新设置生效;VIEW用于查看目前设置的smb.conf的内容;PASSWORD用于管理
加密密码,提供加密认证情况下增加和管理用户,并可以保持Unix和Windows NT的密码一
致,这个功能只在使用了加密密码功能之后才有用,更改的密码将直接保存在
/usr/local/private目录下的smbpasswd 档案中。PASSWORD功能将不但更改smb.conf,还
将更改Samba使用的密码选项,因此对于使用加密密码认证方式的系统,最为有用。<br>
  使用SWAT,设置Samba就非常容易,不再需要手工编辑设置档案,而可以直接使用浏览
器更改设置,并重新启动Samba伺服器。<br>
</FONT><br>
                                      </TD>
                                    </TR>
                                <TR>
                                <TD colSpan=2><FONT 
                                class=middlefont></FONT><BR>
                                        <FONT 
                                class=normalfont>全文结束</FONT> </TD>
                                    </TR>
                                <TR>
                                <TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2 
                                height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
                        <TD vAlign=top width="20%" 
                      background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2> 
                          <DIV align=center> 
                            <table class=tableoutline cellspacing=1 cellpadding=4 
                        width="100%" align=center border=0>
                              <tr class=firstalt> 
                                <td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
                                <font class=normalfont><b>所有分类</b></font></td>
                              </tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td>    </tr>  </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td>    </tr>  </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%>   <table width=100% border=0>    <tr>       <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td>    </tr>  </table></td></tr>                            </table>
                          </DIV></TD></TR>
                    <TR vAlign=top>
                        <TD width="80%"> 
                          <DIV align=center><BR>
                          </DIV>
                        </TD></TR></TBODY></TABLE></TD></TR>
                </TABLE></TD></TR>
          </TABLE>
      <TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee 
        border=0><TBODY>
        <TR>
          <TD width="50%">
              <P><FONT class=middlefont>版权所有 &copy; 2004 <A 
            href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
                违者必究. </FONT></P>
            </TD>
          <TD width="50%">
              <DIV align=right><FONT class=middlefont>Powered by: <A 
            href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
            </TD></TR></TBODY></TABLE>
      <CENTER></CENTER></TD></TR>
    </TABLE></CENTER></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -