Linux 版 (精华区)

发信人: clx (楚留香), 信区: Unix
标  题: SMB HOWTO(06)
发信站: 紫 丁 香 (Sat Jun 27 17:24:08 1998), 转信

SMB HOWTO : 一般组态设定 (/etc/smb.conf)
Previous: 执行这两个 daemon
Next: 分享 Linux 磁碟给 Windows 机器 


5. 一般组态设定 (/etc/smb.conf)

在 linux (或其他 UNIX机器)上的 Samba 组态设定是被单一档案,
/etc/smb.conf ,所控制. 这个档决定你想要哪个系统资源分享给外
面世界以及你想对他们做什麽限制.

因为以下章节将会处理分享 linux 磁碟与印表机给 Windows 机器,
本小节所展示的 smb.conf 档尽量是你所能取得较简单的, 它只是
以介绍性为目的.

目前还不要担心细节部分. 後面的章节将会介绍主要的概念.

在档案中的每的段落{section}会有个段落标头开始, 其标头像是
[global], [homes], [printers] 等等.

[global] 段落定义一些变数, 而 Samba 将用来定义於所有资源之
分享.

[homes] 段落允许远端使用者来存取在当地(linux)机器上之他们的
(且只有他们的) home directories{家目录}. 也就是, 如果一个
Windows 使用者从他们的 Windows 机器要设法连接到这个分享, 他
们将是连接到他们自己个人的 home directiory. 要做这样事情,所
要注意的是,他们必须在linux box上有个帐号.

以下的 smb.conf 档案样本允许远端使用者来用当地机器上他们的
home directories 而且写到一个暂存的目录. 对一个 Windows 使
用者,要想看到这些分享, linux box 必须是在区域网路{local
network}内. 然後,使用者简单地从 Windows File Manager 或
Windows Explorer 连接到网路磁碟.

在以下段落要注意的是, 对这个档之额外项目将会用来允许更多资
源被分享.



     ; /etc/smb.conf
     ;
     ; Make sure and restart the server after making changes to this file, ex:
     ; /etc/rc.d/init.d/smb stop
     ; /etc/rc.d/init.d/smb start

     [global]
     ; Uncomment this if you want a guest account
     ; guest account = nobody
        log file = /var/log/samba-log.%m
        lock directory = /var/lock/samba
        share modes = yes

     [homes]
        comment = Home Directories
        browseable = no
        read only = no
        create mode = 0750

     [tmp]
        comment = Temporary file space
        path = /tmp
        read only = no
        public = yes




SMB HOWTO : 一般组态设定 (/etc/smb.conf)
Previous: 执行这两个 daemon
Next: 分享 Linux 磁碟给 Windows 机器 

--
※ 来源:.紫 丁 香 bbs.hit.edu.cn.[FROM: 202.118.244.16]
[百宝箱] [返回首页] [上级目录] [根目录] [返回顶部] [刷新] [返回]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:1.819毫秒