查阅文当中总结出来的,肯定会存在一些漏洞和错误的注释,希望高手们能够指出,谢谢!!更希望能在朋友们的使用配置samba中派上用场!
#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentary and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic
# errors.
#

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = MSHOME     //设置samba的机器所在工作组

# server string is the equivalent of the NT Description field
   server string = %h server (Samba, Ubuntu)  //服务器描述字符串

# Windows Internet Name Serving Support Section:
# Windows Internet Name Service 微软开发的域名服务系统。

WINS 是Windows Internet Name Server(Windows网际名字服务)的简称。WINS为NetBIOS名字提供名字注册、更新、释放和转换服务,这些服务允许WINS服务器维护 一个将NetBIOS名链接到IP地址的动态数据库,大大减轻了对网络交通的负担。
我们为什么需要WINS服务(把机器名转换成IP地址,它象TCP/IP中DNS那样工作。)
在 默认状态中,网络上的每一台计算机的NetBIOS名字是通过广播的方式来提供更新的,也就是说,假如网络上有n台计算机,那么每一台计算机就要广播 n-1次,对于小型网络来说,这似乎并不影响网络交通,但是当大型网络来说,加重了网络的负担。因此WINS对大中型企业来说尤其重要。
Samba 的运行包含两个后台守护进程:smbd和nmbd,它们是Samba的核心,在全部时间内运行。nmbd 程序使得通过企图计算机可以浏览Linux服务器。Smbd守护进程在SMB软件包到达网上时对它们进行处理,并且为使用或共享它的资源与Linux进行 协调。如果指定的是一个文件,该资源就是一个文件;而一个打印机请求就要求访问一台打印机。实际上,在请求访问打印机时,Smbd把要打印的信息存储到打 印机队列中;在请求访问一个文件时,Smbd把数据发到内核,最后将它存到磁盘上。[url]http://www.linuxmine.com[/url] /4042.html

# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
# WINS支持 - 告知NMBD使能它的WINS 服务器。
;   wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# WINS服务器-告知Samba的NMBD部件成为WINS的一个客户。
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
# SAMBA服务器可以成为其中的一个:WINS 服务器或 WINS客户机,但不能二者皆是。
;   wins server = w.x.y.z
# 这里WINS IP服务器一定要指定。

# This will prevent nmbd to search for NetBIOS names through DNS.
#决定samba是否通过DNS的nslookups去解析主机的NetBIOS的名
   dns proxy = no

# What naming service and in what order should we use to resolve host names
# to IP addresses
;   name resolve order = lmhosts host wins bcast
# 规定名字解析方式的顺序

当客户端在许多网络操作中需要WINS服务器解析名字,例如当使用网络上其它计算机的共享文件时,为了得到共享文件,用户需要指定两件事:系统名和共享名,而系统名就需要转换成IP地址。

名字解析过程是这样的:

(1).当客户端计算机想要转换一个名字时,它首先检查本地NetBIOS名字缓存器。

(2).如果名字不在本地NetBIOS名字缓存器中,便发送一个名字查询到首选WINS服务器(每隔15秒发送一次,共发三次),如果请求失败,则向次选WINS发送同样的请求。

(3).如果都失败了,那么名字解析可以通过其它途径来转换(例如本地广播、lmhosts文件和hosts文件、或者DNS来进行名字解析。
#### Networking ####(针对服务器中有多种网络接口如一张以上的网卡,比如无线网卡,内部局域网卡等)
   本模块的设置含义,参考转载文件Multiple Network Interfaces with Samba。
# The specific set of interfaces / networks to bind to
# 将要绑定的网卡/网络的详细设置
# This can be either the interface name or an IP address/netmask;
#设置的值可以是网卡的名称或者ip地址/网络广播
# interface names are normally preferred
;   interfaces = 127.0.0.0/8 eth0
# 192.168.1.1/24
这个24就是子网掩码,它的二进制是24个1如11111111.11111111.11111111.00000000
换成十进制就是255.255.255.0
61.138.0.93/30
这个30也是子网掩码,IP地址是A类地址.它的二进制是30个1如
11111111.11111111.11111111.11111100
换成十进制就是255.255.255.252
#
# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself.  However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
;   bind interfaces only = true

#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
# 为每个连接samba服务器的机器建立对应的日志文件
   log file = /var/log/samba/log.%m

# Put a capping on the size of the log files (in Kb).
# 设置每个日志文件的最大值,单位为kb。
   max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
# 设置是否只是通过只通过系统日志文件来记录不同的连接机器的日志
;   syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
   syslog = 0
# 如果只是想用syslog记录日志,请把这个值(记录的值)设置的更高一些。

# Do something sensible when Samba crashes: mail the admin a backtrace
# 当samba当机的时候,发送backtrace给admin
   panic action = /usr/share/samba/panic-action %d

#
backtrace是什么? 有人让我发给他们一个backtrace, 我该怎么做?

一 个非常有用的调试工具是backtrace,这实际上是程序当前运行处的 一个快照.它通常是在程序崩溃(意外退出,常伴有段故障或其它错误) 或者挂起(停止运行但不退出)时所做.这里假设你用的是GNU项目的 GDB调试器,因为这是用GNOME时常用并且也是我所用的,如果你用的是 其它的调试器,参照你的文档.

有两种方法做backtrace:你可以用程序崩溃时留下的core文件,也可以 直接在调试器里运行程序.我发现在调试器里运行程序更可靠,不过我 也会讲用core文件的方法.

要 用GDB运行程序,可以在xterm(或类似的东西)里,输入 gdb <full name and location of program>, 比如,要调试gtalk,你可以 做gdb /usr/local/bin/gtalk. GDB不会去搜索路径,所以你需要指定程序在哪里.如果你想带参数运行程序, 可以在稍后指定参数.

然后GDB会自己识别,并且给你一个 (gdb)提示. 在这里,你可以输入run以运行程序. 如果需要带参数运行,把它们放在这儿.例如,要调试不带声音的gtalk,你要 输入run --disable-sound,程序就 开始运行了.记住,程序会比通常的慢,并且占用更多的内存.

现在你要尽力再现你的问题,做不管 什么以产生以前的问题.一旦程序崩溃, 在调试会话里你马上会看到一堆东西和(gdb)提示. 如果程序挂起,等到你确定它挂起在正确的地方,然后在调试会话里按Control-C, 它也会出一堆东西然后是 (gdb)提示.在这个提示下 (不管你是怎么得到的),输入bt,它会给 出实际的backtrace.

这里是一个调试会话的例子,如果你被要求一个backtrace,你需要发送下面所有 的内容:

$ gdb /usr/local/bin/gtalk
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) run --disable-sound
Starting program: /usr/local/bin/gtalk --disable-sound

Program received signal SIGINT, Interrupt.
0x4049290d in __poll (fds=0x808c110, nfds=3, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:45
../sysdeps/unix/sysv/linux/poll.c:45: No such file or directory.
(gdb) bt
#0  0x4049290d in __poll (fds=0x808c110, nfds=3, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:45
#1  0x403c54e9 in g_main_poll (timeout=-1, use_priority=0, priority=0)
    at gmain.c:991
#2  0x403c516e in g_main_iterate (block=1, dispatch=1) at gmain.c:789
#3  0x403c58a1 in g_main_run (loop=0x80882e8) at gmain.c:912
#4  0x401cbf1d in gtk_main () at gtkmain.c:475
#5  0x804a629 in main (argc=2, argv=0xbffffaa4) at main.c:54
#6  0x40407c77 in __libc_start_main (main=0x804a570 <main>, argc=2,
    argv=0xbffffaa4, init=0x8049e10 <_init>, fini=0x804c7dc <_fini>,
    rtld_fini=0x40009c10 <_dl_fini>, stack_end=0xbffffa9c)
    at ../sysdeps/generic/libc-start.c:78
(gdb)

用core dump作backtrace是十分类似的:到core dump所在的目录,然后 运行gdb -c core <full name and location of program>,再说一遍,GDB不搜索你的路径,你需要指定 在哪里能找到程序.然后你所要做的就是在提示下输入 bt,并且把整个会话送出去.


####### Authentication #######

# PAM 是unix的一种鉴别机制
# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html
# in the samba-doc package for details.
# 设置用户登录samba服务器的认证方式(推荐用“user”方式,即需要登录用户提供一个登录帐号)
;   security = user

# You may wish to use password encryption.  See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
# 设置是否对密码进行加密,samba本身有一个密码文件/etc/samba/smbpasswd,如果不对密码进行加密则在验证会话期间客户机和服务器 之间传递的是明文密码,samba直接把这个密码和Linux里的/etc/samba/smbpasswd密码文件进行验证。但是在Windows 95 OS/R2以后的版本和Windows NT SP3以后的版本缺省都不传送明文密码,要让这些系统能传送明文密码必须在其注册表里更改,比较麻烦,好的方法就是把这里的这个开关设置为true。
   encrypt passwords = true

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.  
# 如果你使用加密密码,请指出所使用的密码数据库类型
   passdb backend = tdbsam

   obey pam restrictions = yes
# 设置guest游客帐户
;   guest account = nobody
# 禁用登录帐户
   invalid users = root

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
# 是否需要同步unix和windows的口令
;   unix password sync = no

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<[email]kahan@informatik.tu-muenchen.de[/email]> for
# sending the correct chat script for the passwd program in Debian Sarge).
# 设置更改口令的程序
   passwd program = /usr/bin/passwd %u
# 设置更改口令的协议
   passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .

# 以上用杠隔开部分设置能否从windows的应用程序修改unix系统的用户密码

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
# 设置:当samba服务器收到smb客户端的请求时,是否用pam来取代已经设置为'passwd program'的应用程序,用来修改密码。
;   pam password change = no

########## Domains ###########

# PDC是指一个主域控制器,BDC是一个备份域控制器。你必须在装其他域服务器之前先安装一台PDC。这台主域控制器主要负责备份目录数据和用户的验证。 一台备份域控制器包含着备份的目录数据和用户的验证。如果,PDC坏掉,那么BDC就可以提升为PCD。从PDC升为BDC用户所改变的信息和数据不会丢 失。即使这台BDC提升为PDC,PDC也能降级为BDC。
# Is this machine able to authenticate users. Both PDC and BDC
# must have this setting enabled. If you are the BDC you must
# change the 'domain master' setting to no
# 这台机器可以验证用户么?PDC和BDC都必须激活这一设置。如果你为BDC,你必须将‘domain master’(在下面的-----MISC------中)值设置为no。
#
# samba可以管理整个域的连接控制么?如果想使Samba成为Windows95工作站的登录服务器,则使用此选项。
;   domain logons = yes
#
# The following setting only takes effect if 'domain logons' is set
# 下面的设置仅当'domain logons' 被设置后才起作用
# It specifies the location of the user's profile directory
# from the client point of view)
# 指定本地用户profile的路径。 放置roving profiles 文件的位置(仅用于 Win95 和WinNT) ,%L代表该服务器 NetBIOS名,%U是用户名
# The following required a [profiles] share to be setup on the
# samba server (see below)
# 下面的设置需要你去掉“=== Share Definitions ====”中的[profiles]的注释号';',设置在什么地方存放我们的启动脚本。
;   logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
;   logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
# 指定一个用户home的路径
;   logon drive = H:     \\指定登录的驱动盘
;   logon home = \\%N\%U
# 常用变量说明
%S = 当前服务名(如果有的话)
%P = 当前服务的根目录(如果有的话)
%u = 当前服务的用户名(如果有的话)
%g = 当前用户说在的主工作组
%U = 当前对话的用户名
%G = 当前对话的用户的主工作组
%H = 当前服务的用户的Home目录
%v = Samba服务的版本号。
%h = 运行Samba服务机器的主机名
%m = 客户机的NETBIOS名称
%L = 服务器的NETBIOS名称
%M = 客户机的主机名
%N = NIS服务器名
%p = NIS服务的Home目录
      在一个大型的网络当中,如果有多部 Linux 主机,万一要每部主机都需要设定相同的帐号与密码时,还真是麻烦。 此时,如果能够有一部主控服务器 (master server) 来管理网络中所有主机的帐号,当其他的主机有使用者登入的需求时,才到这部主控服务器上面要求相关的帐号、密码等使用者资料,如此一来,如果想要增加、修 改、删除使用者资料,只要到这部主控服务器上面处理即可, 这样就能够降低重复设定使用者帐号的步骤。

  这样的功能有很多的服务器软件可以达成,这里我们要介绍的则是 Network Information Services (NIS server) 这个服务器软件。
      NIS 最大的用途在于提供客户端的使用者相关参数查询,举例来说,使用者的帐号、密码、UID、家目录、shell 等等的,都可以通过 NIS 服务器来查询的。但 NIS 所能提供的也就是这样了,他并没有办法提供使用者家目录的空间,因此,一般在高效能运算电脑当中,如果想要让所有的机器都拥有相同的帐号密码,通常使用 NIS 提供身份验证,配合 NFS 提供所需要的磁盘空间。
%R = 说采用的协议等级(值可以是CORE, COREPLUS, LANMAN1, LANMAN2,NT1)
%d = 当前服务进程的ID
%a = 客户机的结构(只能识别几项:Samba,WfWg,WinNT,Win95)
%I = 客户机的IP
%T = 当前日期和时间
#
# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# 指定在有用户登录时要运行的脚本。这个脚本必须存放在[netlogon]共享中。
# NOTE: Must be store in 'DOS' file format convention
#
;   logon script = logon.cmd

# 一下还不懂呢。
# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe.  The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

########## Printing ##########

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
# 如果你想自动载入一个打印清单,而不用一个一个的手工录如,可以启动设置这个。
;   load printers = yes

# lpr(ng) printing. You may wish to override the location of the
# printcap file
# 如果打印机系统是非标准的,就需要指定是什么打印系统。
# 现在支持的打印系统有:
# bsd, sysv, plp, lprng, aix, hpux, qnx
;   printing = bsd
# 存放打印机信息文件的路径
;   printcap name = /etc/printcap

# CUPS = Common UNIX Printing System
# CUPS printing.  See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
;   printing = cups
;   printcap name = cups

# When using [print$](下面的---- Share Definitions ---定义), root is implicitly a 'printer admin', but you can
# also give this right to other users to add drivers and set printer
# properties
# 当使用[print$]打印是,root帐户是一个隐含的'printer admin',不过你也可以给其他用户权限来加载驱动和设置打印机属性
;   printer admin = @lpadmin


############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
# 指定对不同机器的连接采用不同的配置文件,由于采用了samba的变量,把配置文件和客户机的NETBIOS名称关联起来,能很容易的控制这些客户机的权限和设置
;   include = /home/samba/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# 大多数人会发现这个选项能够使打印实现较好的性能。
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
# for details
# You may want to add the following on a Linux system:

#         SO_RCVBUF=8192 SO_SNDBUF=8192
   socket options = TCP_NODELAY

#  这个是网络socket方面的一些参数,能实现最好的文件传输性能。相关的选项还有SO_KEEPALIVE、 SO_REUSEADDR、SO_BROADCAST、IPTOS_LOWDELAY、IPTOS_THROUGHPUT、SO_SNDLOWAT (*)、SO_RCVLOWAT(*),带*号的要指定数值。一般如果在本地网络,就只用IPTOS_LOWDELAY,如果是有一个本地网络的,就用 IPTOS_LOWDELAY TCP_NODELAY,如果是广域网络,就试试IPTOS_THROUGHPUT。

# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
# 仅当你已经安装了linpopup时,你会发现这个变量的设置是非常有用的。
# 这将使samba和linpopup的维护者在linpopup和samba的安装与设置方面变得非常简单。
;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.

# 这个参数让nmbd成为一个域浏览器,取得各本地主浏览器的浏览列表,并将整个域的浏览列表递交给各本地主浏览器。将Samba服务器定义为主域浏览器。此选项将允许Samba在子网列表中比较浏览。如您已经有一台Windows NT域控制器,不要使用此选项。
;   domain master = auto

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
# (UID:用户身份唯一标识。GID:用户组身份唯一标识。每一个用户只能有一个唯一的UID和 GID)
# 系统是通过gid和uid来时别用户的,而不是名称。
# 有关winbind的信息,请参考winbind介绍 。
;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares.  This will share each
# user's home directory as \\server\username

# 共享设置中有个比较奇怪的段:
[homes], 在smb.conf文件中一般没有对这个目录的设定特定内容比如路径等。当客户机发出服务请求时,就在smb.conf文件的其它部分查找有特定内容的服 务。如果没有发现这些服务,并且提供了homes段时,那么就搜索密码文件得到用户的Home目录。通过Homes段,Samba可以得到用户的Home 目录并使之共享。

[homes] 段中的设置控制了每一个用主目录的共享权限。
comment 参数指定的字符串在你浏览本机资源时出现在指定资源的旁边。
browseable 参数控制一项服务是否能够出现在网络资源浏览表中。这里是一些非直觉的东西, browseable = no 意味着这个目录将在浏览时显示为要验证的用户名称。 举例来说, 指定 browseable = no, 当我浏览这个 Samba 服务器时, 我将看到一个名称为 cuckoo 的共享目录。当指定 browseable = yes 时, 我将看到一个名为 homes 和 cuckoo 的共享目录。设置 read only = no 将允许通过验证的用户对主目录有写入的权限。 但是, 如果他们的主目录的 UNIX 权限 不允许写入, 那么他们就没有写的权限。 无论 UNIX 的权限怎样, 设置 read only = yes 后, 他们的主目录是只读的。
      printing 命令描述了本地打印系统类型, 这可以让 Samba 知道怎样提交打印任务, 显示打印队列, 删除打印任务和其它操作。 如果打印系统是 Samba 所不知道的, 你必须在每次执行打印操作时指明命令。
      清单中[printing]一段配置允许任何能够登录到 Samba 服务器的用户使用 printcap 中出现的 每一台打印机。 正常情况下, 如果使用用户级别安全控制, guest ok = yes 并不能授权每一个用户(使用系统)。 每一个打印服务必须定义为 printable = yes。
;[homes]
;   comment = Home Directories
;   browseable = no
# 当一个客户程序以客人用户类出本服务器的共享服务时,不列出homes服务。
# 但是本机用户创建的主目录服务仍使用[global]节设定的browseable。

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.  Un-comment the following parameter
# to make sure that only "username" can connect to \\server\username
# 在默认状态下,\\server\username 共享的内容可以被任何一个可以登录samba服务起的用户连接。如果你想只让'username'可以连接‘\\server\username’目录的话,则取消下面变量的注释。
;   valid users = %S

# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
# 取消下面的注释,可以是home目录可写。(默认为只读)
;   writable = no

# File creation mask is set to 0600 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0664.
# 设置新建文件的权限属性
;   create mask = 0600

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
# 设置新建路径的权限属性
;   directory mask = 0700

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)

#如果想对应不同的用户在登录时执行不同的脚本,则取消下面的注释。指定netlogon的路径,因为它只在登录时使用,所以不必将其公开。在这个路径里有对应每个用户组有一个.bat脚本文件。
;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   writable = no
;   share modes = no

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
# 指定用于存放用户profile文件的路径,并设置权限为可写,以便在用户第一次登录系统时,系统可自动产生相应的路径。
;[profiles]
;   comment = Users profiles
;   path = /home/samba/profiles
;   guest ok = no
;   browseable = no
;   create mask = 0600
;   directory mask = 0700

# 一下部分比较简单,不用在标注解释,一些设置只有在不断的设置实践中去理解。
[printers]
   comment = All Printers
   browseable = no
   path = /tmp
   printable = yes
   public = no
   writable = no
   create mode = 0700


# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# Replace 'ntadmin' with the name of the group your admin users are
# members of.
;   write list = root, @ntadmin

# A sample share for sharing your CD-ROM with others.
;[cdrom]
;   comment = Samba server's CD-ROM
;   writable = no
;   locking = no
;   path = /cdrom
;   public = yes

# The next two parameters show how to auto-mount a CD-ROM when the
#    cdrom share is accesed. For this to work /etc/fstab must contain
#    an entry like this:
#
#       /dev/scd0   /cdrom  iso9660 defaults,noauto,ro,user   0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
#    is mounted on /cdrom
#
;   preexec = /bin/mount /cdrom
;   postexec = /bin/umount /cdrom