驿夫 發表於 2008-9-8 17:17:11

Fedora Linux 8系统下配置SAMBA

<p>1、使用yum命令来<a class="UBBWordLink" href="#" target="_blank">安装</a>或更新你的SAMBA包。<br /><br />yum install samba<br /><br />2、samba的配置文件在如下<br /><br />/etc/samba/smb.conf<br /><br />修改其配置如下:<br /><br />#======================= Global Settings =====================================<br /><br /><br /># ----------------------- Netwrok Related Options -------------------------<br />#<br /># workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH<br />#<br /># server string is the equivalent of the NT Description field<br />#<br /># netbios name can be used to specify a server name not tied to the hostname<br />#<br /># Interfaces lets you configure Samba to use multiple interfaces<br /># If you have multiple network interfaces then you can list the ones<br /># you want to listen on (never omit localhost)<br />#<br /># Hosts Allow/Hosts Deny lets you-restrict who can connect, and you can<br /># specifiy it as a per share option as well<br />#<br />workgroup = robin<br />server string = MYSERVER<br /><br />netbios name = MYSERVER<br /><br />; hosts allow = 127. 192.168.<br /><br /># --------------------------- Logging Options -----------------------------<br />#<br /># Log File let you specify where to put logs and how to split them up.<br />#<br /># Max Log Size let you specify the max size log files should reach<br /><br /># logs split per machine<br />log file = /var/log/samba/log.%m<br /># max 50KB per log file, then rotate<br />max log size = 50<br /><br /># ----------------------- Standalone Server Options ------------------------<br />#<br /># Scurity can be set to user, share(deprecated) or server(deprecated)<br />#<br /># Backend to store user information in. New installations should<br /># use either tdbsam or ldapsam. smbpasswd is available for backwards<br /># compatibility. tdbsam requires no further configuration.<br /><br />security = share<br />; encrypt passwords = yes<br />guest ok = yes<br />guest account = root<br /><br />#============================ Share Definitions ==============================<br /><br /><br />comment = Home Directories<br />browseable = no<br />writable = yes<br />; valid users = %S<br />; valid users = MYDOMAIN\%S<br /><br /><br />comment = All Printers<br />path = /var/spool/samba<br />browseable = no<br />; guest ok = no<br />; writable = No<br />printable = yes<br /><br /># Un-comment the following and create the netlogon directory for Domain Logons<br />; <br />; comment = Network Logon Service<br />; path = /var/lib/samba/netlogon<br />; guest ok = yes<br />; writable = no<br />; share modes = no<br /><br /># Un-comment the following to provide a specific roving profile share<br /># the default is to use the user&#39;s home directory<br />; <br />; path = /var/lib/samba/profiles<br />; browseable = no<br />; guest ok = yes<br /><br /># A publicly accessible directory, but read only, except for people in<br /># the &quot;staff&quot; group<br />; <br />; comment = Public Stuff<br />; path = /home/samba<br />; public = yes<br />; writable = yes<br />; printable = no<br />; write list = +staff<br /><br /><br />path = /root/temp<br />writeable = yes<br />; browseable = yes<br />guest ok = yes<br /><br />3、重启SAMBA服务<br /><br />/etc/init.d/smb restart<br /><br />4、Enjoy<br /><br />PS:Fedora Core从V2起都有预装SELinux,这个不会配置的可以先把她关掉,关闭的<a class="UBBWordLink" href="#" target="_blank">方法</a>如下:<br /><br />修改/etc/selinux/config文件中的SELINUX=&quot;&quot; 为 disabled ,然后重启FC。<br />&nbsp;</p>
頁: [1]
查看完整版本: Fedora Linux 8系统下配置SAMBA