Provided by: manpages-zh_1.6.3.2-1_all bug

NAME

       smb.conf - Samba組件的配置文件

總覽 SYNOPSIS

       smb.conf是Samba組件的配置文件,包含Samba程序運行時的配置信      息.smb.conf被設計成可由swat
       (8)程序來配置和管理.本文件包含了 關於smb.conf的文件格式和可能出現的選項的完整描述以供參考.

文件格式 FILE FORMAT

       本文件由一系列段和選項構成.一個段由一對方括號中的段名開始,直到下一個段名結束.包含在段中的
       選項按以下格式定義:

       選項名 = 選項值

       本文件是基於文本行的.這就是說,每一個以換行符結束的行描述了一個項目(註釋,段名,或選項).

       段名和選項名是不區分大小寫的.

       只有選項設置中的第一個等號纔有意義.第一個等號前後的空格會被忽略.段名和選項名的前後以及中間
       包含的空格是無關的.選項值前後的空格會被忽略.選項值中包含的空格會原樣保留.

       所有以';'和'#'符開頭的行都會被忽略,就象只有空格的行那樣.

       按照UNIX上的慣例,以'´符號結尾的行續下一行.(也就是說:'´是續行符,如果一行寫不下,可以在行尾
       以'´結束,在下一行繼續寫--譯註)

       等號後面跟的是字符串(無需引號)或者邏輯值(可以是yes/no,1/0,或者true/false  來表示).邏輯值是
       不區分大小寫的.字符串值則原樣保留了輸入的大小寫.某些選項 (例如create modes)的值是數值型的.

段描述 SECTION DESCRIPTIONS

       配置文件的每一段([global]段除外)描述一項共享資源.段名就是共享名,段內的選項設置確定了該共享
       資源的屬性.

       三個特殊段([global],[homes],[printers])將在後面'special sections'單獨說明,以下的內容是普通
       段的說明.

       一個共享資源由一個文件目錄和用戶對此目錄的操作權限的說明構成.另外,還列入了一些用於內部管理
       的選項.

       每一段定義了一項文件服務(客戶端可以把它看作其本機文件系統的延伸)或打印服務(客戶端可以通過
       它來使用服務器提供的打印服務).

       段可以定義成guest服務類型,在這種情況下,客戶無需口令就可以訪問該資源.一個特定的UNIX系統下
       的guest account通常用來指定這種情況下的客戶訪問權限.

       除了guest服務類型以外,其他類型的段定義的共享資源都需要口令才能訪問.用戶名是由客戶端提供
       的.由於某些老的客戶端只提供口令,沒有用戶名,你需要在共享定義中使用"user="選項來指定一個用戶
       列表,以便根據這個用戶列表進行口令驗證.對於象Windos95/98和WindowsNT這樣的現代客戶端程序,這
       個選項是不需要的.

       注意,對於資源的操作權限還取決於主機系統賦予指定用戶或來訪者賬戶的權限.samba提供的服務權限
       不能超出主機系統指定的權限範圍.

       下面的示範段定義了一項文件服務,用戶擁有對/home/bar目錄進行寫操作的權限.這個共享資源是通過
       共享名"foo"來訪問的.

       [foo]
            path = /home/bar
            read only = no

       下面示範段定義了一項打印服務,此共享資源是隻讀的,但是可以進行打印操作.也就是說,唯一允許的寫
       操作只能是打開、寫入並關閉一個打印假脫機文件.其中的guest        ok選項定義意味着允許以缺省
       的guest用戶(在別處定義的)權限進行訪問.

       [aprinter]
            path = /usr/spool/public
            read only = yes
            printable = yes
            guest ok = yes

特殊段 SPECIAL SECTIONS

   [global] 全局選項段
       這一段中定義的選項是服務器的全局性設置,如果在其他段中沒有再對這些選項進行重新設置的話還可
       以作爲它們的缺省選項.更多的說明請參閱'PARAMETERS'部分的內容.

   [homes] 個人目錄段
       如果配置文件中包含名爲'homes'的段,就可以建立客戶到自己在服務器上的個人目錄的連接.

       當服務器收到連接請求時,首先在已定義的段中搜索,如果段名與被請求的共享資源名一致,則該段的內
       容就被採用.如果沒有找到匹配的段,則被請求的資源就被當作是一個用戶名,同時服務器查看本地的口
       令文件.如果該用戶名在口令文件中存在且用戶給出了正確的口令,服務器就會複製[homes]段的內容來
       生成一個共享資源(供該用戶訪問).

       對新建共享會做以下修改:

       共享名從'homes'改爲查到的用戶名.

       如果沒有指定訪問路徑,則設置爲該用戶的個人目錄.

       如果要在[homes]段中定義訪問路徑path=,宏%S也許對你很有用.舉例如下:

       path = /data/pchome/%S

       如果你的PC 有與UNIX服務器上個人目錄不同的目錄,象上面這樣的設置會很有用的.

       這是爲大量用戶提供對他們個人目錄的訪問的一種快速簡潔的辦法.

       如果被請求訪問的共享資源名就是'homes',那麼,除了共享名不被改變爲發出請求的用戶名外,其他處理
       過程和前面提到的過程是類似的.這種方式適合於不同用戶共享一臺終端的情況.

       在[homes]段中可以定義所有普通段中可以使用的選項,可是有些選項更有意義.下面是一個實用的、典
       型的[homes]段的例子:

       [homes]
            read only = no

       注意,很重要的一點是:如果在[homes]段中定義了允許以guest賬戶訪問的話,任何人都可以無須口令而
       訪問所有賬戶的宿主目錄.也許在某些特殊情況下,這正是想要的結果,在這種情況下,你最好同時
       把[homes]段設置成只讀.

       注意,自動的宿主目錄共享資源的可瀏覽標誌是從[global]段繼承來的,而不是[homes]段.這樣,當
       在[homes]段中設置browseable=no時,用戶就看不到單獨的'homes'共享,但可以看到自動的宿主目錄.

   [printers] 打印機共享設置段
       這一段很象[homes]段,不過是用於設置共享打印機的.

       如果在本配置文件中存在[printers]段,用戶就可以連接到在主機上的printcap文件 中指定的任一打印
       機.

       當服務器收到連接請求時,首先在已定義的段中搜索,如果有段名與被請求的共享資源名一致,則該段的
       內容就被採用.如果沒有找到匹配的段,且在配置文件中存在[homes]段,則按照前面所說的方式處理.否
       則,被請求的資源就被當作是一個打印機名,服務器在適當的printcap文件中查找,檢驗被請求的共享資
       源名是否是有效的打印機共享名.如果共享名匹配,服務器就會複製[printers]段的內容來生成一個共享
       打印服務.

       對新建共享的修改:

       共享名被設置爲查找到的打印機名.

       如果未給出打印機名,則把打印機名設爲前面查找到的打印機名.

       如果該共享資源不允許以guest身份進行訪問,且沒有給出用戶名,那麼用戶名就被設爲前面查找到的打
       印機名.

       注意,[printers]段必須設置爲可打印,如果你不這樣設置,服務器會拒絕裝載配置文件.

       指定的典型路徑應該設爲一個公用的可寫假脫機目錄(spooling)並且設置sticky標誌.一個典型
       的[printers]段如下所示:

       [printers]
            path = /usr/spool/public
            guest ok = yes
            printable = yes

       上臺打印機在printcap文件中列出的所有別名都是服務器相關的有效打印機名.如果你係統的打印子系
       統的工作方式不是這樣,你就必須設置一個僞printcap文件,其中包含一行或多行如下格式的設置:

       別名1|別名2|別名3|別名4...

       每個別名必須是你的打印子系統可以接受的打印機名.在[global]段中指定這個新文件作爲你
       的printcap文件.這個僞printcap文件可以包含任何你要的別名,而服務器只識別在此文件中列出的名
       字.這個技術可以很方便的用於限制對本地打印機子集的訪問.

       順便提一下,printcap文件中的別名用每個記錄第一項的任何部分來定義.記錄由換行進行分隔.如果一
       條記錄中有多個部分,中間用"|"符號分隔.

              Note

              注意,在SYSV系統中,用lpstat可以確定系統中安裝了什麼樣的打印機.你可以設置"printcap
              name = lpstat"來自動獲得打印機列表.詳情參見"printcap name"選項.

選項 PARAMETERS

       選項定義了每個段的屬性.

       有些選項是在[global]段中設定的(比如有關安全特性的設置),有些可以用在任何段中的(比如建立方式
       ),剩下的就只能用在普通的段中了.在以下的描述中,[homes]和[printers]段被看作是普通段.標
       記(G)表示此選項只能在[global]段中使用,標記(S)表示此選項可以在服務定義段中使用.注意,有(S)標
       記的選項也可以用在[global]段中,在這種情況下,這個選項設置被當作所有其他段的缺省設置.

       選項的詳細說明是按照字母順序排列的,這樣也許不是最好的分類方式,但至少保證你可以找得到他
       們.如果有多個同義詞,那麼我們只對首選的那個作詳細說明,其他的同義詞都只指明參閱那個首選的選
       項名.

變量替換 VARIABLE SUBSTITUTIONS

       在配置文件中可以用很多字符串進行替換.例如,當用戶以john的名稱建立連接後,選項"path         =
       /tmp/%u"就被解釋成"path = /tmp/john".

       這些置換會在後面的描述中說明,這裏說明一些可以用在任何地方的通用置換.它們是:

       %U     對話用戶名(客戶端想要的用戶名不一定與取得的一致.)

       %G     %U的用戶組名

       %h     運行Samba的主機的internet主機名

       %m     客戶機的NetBIOS名(非常有用)

       %L     服務器的NetBIOS名.這使得你可以根據調用的客戶端來改變你的配置,這樣你的服務器就可以擁
              有"雙重個性".

              Note that this parameter is not available  when  Samba  listens  on  port  445,  as
              clients no longer send this information

       %M     客戶端的internet主機名

       %R     協議協商後選擇的協議,它可以是CORE,COREPLUS,LANMAN1,LANMAN2或NT1中的一種.

       %d     當前samba服務器的進程號.

       %a     遠程主機的結構.現在只能認出來某些類型,並且不是100%可靠.目前支持的
              有Samba、WfWg、WinNT和Win95.任何其他的都被認作"UNKNOWN".如果出現錯誤就給samba-
              bugs@samba.org發一個3級的日誌以便修復這個bug.

       %I     客戶機的IP地址.

       %T     當前的日期和時間.

       %D     Name of the domain or workgroup of the current user.

       %$(envvar)
              The value of the environment variable envar.

       The  following  substitutes  apply  only to some configuration options(only those that are
       used when a connection has been established):

       %S     當前服務名

       %P     當前服務的根目錄

       %u     當前服務的用戶名

       %g     %u的用戶組名

       %H     %u所表示的用戶的宿主目錄

       %N     tNIS服務器的名字.它從auto.map獲得.如果沒有用--with-auto-mount選項編譯samba,那麼它的
              值和%L相同.

       %p     用戶宿主目錄的路徑.它由NIS的auot.map得到.NIS的auot.map入口項被分爲"%N:%p".

       靈活運用這些置換和其他的smb.conf選項可以做出非常有創造性的事情來.

NAME

       Samba支持"名稱修正",這樣dos和windows客戶端就可以使用與8.3格式不一致的文件.也可以用來調
       整8.3格式文件名的大小寫.

       有一些選項可以控制名稱修正的執行,下面集中列出來.對於缺省情況請看testparm程序的輸出結果.

       所有這些選項都可以針對每個服務項單獨設置(當然也可以設爲全局變量).

       這些選項是:

       mangle case = yes/no
              作用是控制是否對不符合缺省寫法的名稱進行修正.例如,如果設爲yes,象"Mail"這樣的文件名
              就會被修正.缺省設置是no.

       case sensitive = yes/no
              控制文件名是否區分大小寫.如果不區分的話,Samba就必須在傳遞名稱時查找並匹配文件名.缺
              省設置是no.

       default case = upper/lower
              控制新文件名大小寫缺省值.缺省設置是小寫.

       preserve case = yes/no
              控制建新文件時是否用客戶所提供的大小寫形式,或強制用缺省形式.缺省爲yes.

       short preserve case = yes/no
              控制新建8.3格式的文件名時是全部用大寫及合適長度,還是強制用缺省情況.它可以和上面
              的"preserve case = yes"聯用以允許長文件名保持大小寫不變,而短文件名爲小寫.本項的缺省
              設置是yes.

       缺省情況下,Samba3.0與Windows NT相同,就是不區分大小寫但保持大小寫形式.

用戶名/口令檢驗中的注意事項 NOTE ABOUT USERNAME/PASSWORD VALIDATION

       用戶有多種連接到服務項的方式.服務器按照下面的步驟來確定是否允許客戶對指定服務的連接.如果下
       面步驟全部失敗,則拒絕用戶的連接請求.如果某一步通過,餘下的檢驗就不再進行.

       如果被請求的服務項設置爲guest only = yes,並且,服務運行在共享級安全模式(security = share)
       ,則跳過1--5步檢查.

       第一步:
          如果客戶端提供一對用戶名和口令,且這對用戶名和口令經unix系統口令程序檢驗爲有效,那麼就以
          該用戶名建立連接.注意,這包括用\\server\service%username方式傳遞用戶名.

       第二步:
          如果客戶端事先在系統上註冊了一個用戶名,並且提供了正確的口令,就允許建立連接.

       第三步:
          根據提供的口令檢查客戶端的netbios名及以前用過的用戶名,如匹配,就允許以該用戶名建立連接.

       第四步:
          如果客戶端以前有合法的用戶名和口令,並獲得了有效的令牌,就允許以該用戶名建立連接.

       第五步:
          如果在smb.conf裏設置了"user     =    "字段,且客戶端提供了一個口令,口令經UNIX系統檢驗,並
          與"user="字段裏某一個用戶匹配,那麼就允許以"user="裏匹配到的用戶名建立連接.如果"user="字
          段是以@開始,那麼該名字會展開爲同名組裏的用戶名列表 .

       第六步:
          如果這是一個提供給guest用的服務項,那麼連接以"guest  account ="裏給出的用戶名建立,而不考
          慮提供的口令.

全局選項完整列表 COMPLETE LIST OF GLOBAL PARAMETERS

       以下列出了所有的全局選項,各選項的詳細說明請參看後面的相應段落.注意,有些選項的意義是相同的.

       •  abort shutdown scriptadd group scriptadd machine scriptaddprinter commandadd share commandadd user scriptadd user to group scriptafs username mapalgorithmic rid baseallow trusted domainsannounce asannounce versionauth methodsauto servicesbind interfaces onlybrowse listchange notify timeoutchange share commandclient lanman authclient ntlmv2 authclient plaintext authclient schannelclient signingclient use spnegoconfig filedeadtimedebug hires timestampdebugleveldebug piddebug timestampdebug uiddefaultdefault servicedelete group scriptdeleteprinter commanddelete share commanddelete user from group scriptdelete user scriptdfree commanddisable netbiosdisable spoolssdisplay charsetdns proxydomain logonsdomain masterdos charsetenable rid algorithmencrypt passwordsenhanced browsingenumports commandget quota commandgetwd cacheguest accounthide local usershomedir maphost msdfshostname lookupshosts equividmap backendidmap gididmap uidincludeinterfaceskeepalivekernel change notifykernel oplockslanman authlarge readwriteldap admin dnldap delete dnldap filterldap group suffixldap idmap suffixldap machine suffixldap passwd syncldap portldap serverldap sslldap suffixldap user suffixlm announcelm intervalload printerslocal masterlock dirlock directorylock spin countlock spin timelog filelog levellogon drivelogon homelogon pathlogon scriptlpq cache timemachine password timeoutmangled stackmangle prefixmangling methodmap to guestmax disk sizemax log sizemax muxmax open filesmax protocolmax smbd processesmax ttlmax wins ttlmax xmitmessage commandmin passwd lengthmin password lengthmin protocolmin wins ttlname cache timeoutname resolve ordernetbios aliasesnetbios namenetbios scopenis homedirntlm authnt pipe supportnt status supportnull passwordsobey pam restrictionsoplock break wait timeos2 driver mapos levelpam password changepanic actionparanoid server securitypassdb backendpasswd chatpasswd chat debugpasswd programpassword levelpassword serverpid directoryprefered masterpreferred masterpreloadpreload modulesprintcapprivate dirprotocolread bmpxread rawread sizerealmremote announceremote browse syncrestrict anonymousrootroot dirroot directorysecurityserver schannelserver signingserver stringset primary group scriptset quota commandshow add printer wizardshutdown scriptsmb passwd filesmb portssocket addresssocket optionssource environmentstat cachesyslogsyslog onlytemplate homedirtemplate primary grouptemplate shelltime offsettime servertimestamp logsunicodeunix charsetunix extensionsunix password syncupdate encrypteduse mmapusername levelusername mapuse spnegoutmputmp directorywinbind cache timewinbind enable local accountswinbind enum groupswinbind enum userswinbind gidwinbind separatorwinbind trusted domains onlywinbind uidwinbind use default domainwins hookwins partnerswins proxywins serverwins supportworkgroupwrite rawwtmp directory

服務選項完整列表 COMPLETE LIST OF SERVICE PARAMETERS

       以下列出了所有關於服務項的選項,各選項的詳細說明請參見後面的相應段落.注意,有些選項的意義是
       相同的.

       •  acl compatibilityadmin usersafs shareallow hostsavailableblocking locksblock sizebrowsablebrowseablecase sensitivecasesignamescommentcopycreate maskcreate modecsc policydefault casedefault devmodedelete readonlydelete veto filesdeny hostsdirectorydirectory maskdirectory modedirectory security maskdont descenddos filemodedos filetime resolutiondos filetimesexecfake directory create timesfake oplocksfollow symlinksforce create modeforce directory modeforce directory security modeforce groupforce security modeforce userfstypegroupguest accountguest okguest onlyhide dot fileshide fileshide special fileshide unreadablehide unwriteable fileshosts allowhosts denyinherit aclsinherit permissionsinvalid userslevel2 oplockslockinglppause commandlpq commandlpresume commandlprm commandmagic outputmagic scriptmangle casemangled mapmangled namesmangling charmap acl inheritmap archivemap hiddenmap systemmax connectionsmax print jobsmax reported print jobsmin print spacemsdfs proxymsdfs rootnt acl supportonly guestonly useroplock contention limitoplockspathposix lockingpostexecpreexecpreexec closepreserve caseprintableprintcap nameprint commandprinterprinter adminprinter nameprintingprint okprofile aclspublicqueuepause commandqueueresume commandread listread onlyroot postexecroot preexecroot preexec closesecurity maskset directoryshare modesshort preserve casestrict allocatestrict lockingstrict syncsync alwaysuse client driveruserusernameusersuse sendfile-validvalid usersveto filesveto oplock filesvfs objectvfs objectsvolumewide linkswritablewriteablewrite cache sizewrite listwrite ok

每一個選項的詳細解釋 EXPLANATION OF EACH PARAMETER

       abort shutdown script (G)
              This parameter only exists in the HEAD cvs branch This a full path name to a script
              called by smbd(8) that should stop a shutdown  procedure  issued  by  the  shutdown
              script.

              This command will be run as user.

              缺省設置: None.

              示例: abort shutdown script = /sbin/shutdown -c

       acl compatibility (S)
              This  parameter specifies what OS ACL semantics should be compatible with. Possible
              values are winnt for Windows NT 4, win2k for Windows 2000 and above  and  auto.  If
              you  specify  auto,  the value for this parameter will be based upon the version of
              the client. There should be no reason to change this parameter from the default.

              缺省設置: acl compatibility = Auto

              示例: acl compatibility = win2k

       add group script (G)
              This is the full pathname to a script that will be run AS ROOT by  smbd(8)  when  a
              new group is requested. It will expand any %g to the group name passed. This script
              is only useful for installations using the Windows NT domain administration  tools.
              The  script  is  free  to  create a group with an arbitrary name to circumvent unix
              group name restrictions. In that case the script must print the numeric gid of  the
              created group on stdout.

       add machine script (G)
              This is the full pathname to a script that will be run by smbd(8) when a machine is
              added to it's domain using the administrator username and password method.

              This option is only required when using sam back-ends tied to the Unix  uid  method
              of RID calculation such as smbpasswd. This option is only available in Samba 3.0.

              缺省設置: add machine script = <空字符串>

              示例: add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null
              -s /bin/false %u

       addprinter command (G)
              With the introduction of MS-RPC based printing support for Windows NT/2000  clients
              in  Samba  2.2,  The  MS Add Printer Wizard (APW) icon is now also available in the
              "Printers..." folder displayed a share listing. The APW allows for printers  to  be
              add remotely to a Samba or Windows NT/2000 print server.

              For  a  Samba  host  this  means  that  the printer must be physically added to the
              underlying printing system. The add printer command defines  a  script  to  be  run
              which  will  perform  the  necessary operations for adding the printer to the print
              system and to add the appropriate service definition to the smb.conf file in  order
              that it can be shared by smbd(8).

              The  addprinter  command  is automatically invoked with the following parameter (in
              order):

              printer name

              share name

              port name

              driver name

              location

              Windows 9x driver location

              All parameters are filled in from the PRINTER_INFO_2 structure sent by the  Windows
              NT/2000  client  with  one exception. The "Windows 9x driver location" parameter is
              included for backwards compatibility only. The remaining fields  in  the  structure
              are generated from answers to the APW questions.

              Once  the  addprinter command has been executed, smbd will reparse the  smb.conf to
              determine if the share defined by  the  APW  exists.  If  the  sharename  is  still
              invalid, then smbd  will return an ACCESS_DENIED error to the client.

              The  "add  printer  command"  program can output a single line of text, which Samba
              will set as the port the new printer is connected to. If this  line  isn't  output,
              Samba won't reload its printer shares.

              參見  deleteprinter command, printing, show add printer wizard

              缺省設置: none

              示例: addprinter command = /usr/bin/addprinter

       add share command (G)
              Samba  2.2.0  introduced  the  ability to dynamically add and delete shares via the
              Windows NT 4.0 Server Manager. The add share command is used to define an  external
              program  or script which will add a new service definition to smb.conf. In order to
              successfully execute the add share command, smbd requires that the administrator be
              connected using a root account (i.e. uid == 0).

              When  executed,  smbd  will  automatically  invoke  the add share command with four
              parameters.

              configFile - the location of the global smb.conf file.

              shareName - the name of the new share.

              pathName - path to an **existing** directory on disk.

              comment - comment string to associate with the new share.

              This parameter is only used for add file shares. To add  printer  shares,  see  the
              addprinter command.

              參見 change share command, delete share command.

              缺省設置: none

              示例: add share command = /usr/local/bin/addshare

       add user script (G)
              這個選項指出一個腳本的完整文件路徑,這個腳本將在特定環境下(下面有詳細解釋)由smbd
              (8)以root身份執行.

              通常,samba服務器需要爲所有訪問服務器上文件的用戶建立UNIX用戶賬號.但是在使用Windows
              NT賬號數據庫作爲主用戶數據庫的站點,建立這些用戶並在與NT的主域控制器保持用戶列表同步
              是一件很麻煩的事情.這個選項使smbd可以在用戶訪問時根據需要自動生成UNIX用戶賬號.

              爲了使用這個選項,smbd必須被設置成security=server或者security=domain,並且add    user
              script必須設爲用%u參數來建立unix帳號的腳本文件的全路徑,%u擴展成建立的unix帳號名.

              當windows用戶嘗試訪問samba服務器時,在登陸時(建立SMB協議會話),smbd口令服務器聯
              繫,並嘗試驗證用戶名和口令.如果成功,smbd就會根據unix的口令文件試着將這個windows用戶
              映射成一個unix用戶.如果查找失敗,但設置了add user script ,smbd就會以root的身份調用這
              個腳本,將%u擴展成該要建立的用戶賬號.

              如果這個腳本執行成功,smbd就認爲這個用戶已經存在.用這種方式,可以動態建立UNIX用戶賬號
              並匹配已有的NT賬號.

              參見  security, password server, delete user script.

              缺省設置: add user script = <空字符串>

              示例: add user script = /usr/local/samba/bin/add_user %u

       add user to group script (G)
              Full  path  to the script that will be called when a user is added to a group using
              the Windows NT domain administration tools. It will be run by smbd(8) AS ROOT.  Any
              %g  will  be replaced with the group name and any %u will be replaced with the user
              name.

              缺省設置: add user to group script =

              示例: add user to group script = /usr/sbin/adduser %u %g

       admin users (S)
              admin  users定義一組對共享有管理特權的用戶.就相當於這些用戶可以象超級用戶那樣操作所
              有的文件.

              小心使用該選項,因爲在這個名單裏的用戶可以對共享資源作任何他們想做的事.

              缺省設置: 沒有 admin users

              示例: admin users = jason

       afs share (S)
              This parameter controls whether special AFS features are enabled for this share. If
              enabled, it assumes that the directory exported via the path parameter is  a  local
              AFS import. The special AFS features include the attempt to hand-craft an AFS token
              if you enabled --with-fake-kaserver in configure.

              缺省設置: afs share = no

              示例: afs share = yes

       afs username map (G)
              If you are using the fake kaserver AFS feature, you might want  to  hand-craft  the
              usernames  you  are  creating tokens for. For example this is necessary if you have
              users from several domain in your AFS Protection Database. One possible  scheme  to
              code users as DOMAIN+User as it is done by winbind with the + as a separator.

              The  mapped  user  name  must contain the cell name to log into, so without setting
              this parameter there will be no token.

              缺省設置: none

              示例: afs username map = %u@afs.samba.org

       algorithmic rid base (G)
              This determines how Samba will use its algorithmic mapping  from  uids/gid  to  the
              RIDs needed to construct NT Security Identifiers.

              Setting  this  option to a larger value could be useful to sites transitioning from
              WinNT and Win2k, as existing user and group rids would otherwise clash  with  sytem
              users etc.

              All  UIDs  and GIDs must be able to be resolved into SIDs for the correct operation
              of ACLs on the server. As such the algorithmic mapping can't be 'turned  off',  but
              pushing it 'out of the way' should resolve the issues. Users and groups can then be
              assigned 'low' RIDs in arbitary-rid supporting backends.

              缺省設置: algorithmic rid base = 1000

              示例: algorithmic rid base = 100000

       allow hosts (S)
              和hosts allow同義.

       allow trusted domains (G)
              這個選項只在security選項被設成serverdomain模式時纔有效果.如果設爲no的話,嘗試聯接
              到smbd運行的域或工作組以外的資源時會失敗,即使那個域是由遠程服務器驗證爲可信的也不
              行.

              如果你只需要在域中對成員提供服務資源的話這個選項是非常有用的.舉例來說,假設有兩個
              域DOMA和DOMB,DOMA已經向DOMB進行了委託,而samba服務器位於DOMA中.在通常情況下,在DOMB中
              有賬號的用戶可以用同樣的samba服務器賬號名訪問UNIX上的資源.而無須他在DOMA上有賬號.不
              過這樣就使安全界線更難分清了.

              缺省設置: allow trusted domains = yes

       announce as (G)
              這個選項定義nmbd(8)   對網絡鄰居聲稱的服務器類型.缺省爲windows   NT.可選項有"NT",它
              與"NT Server"同義,"NT  Server","NT  Workstation","Win95"或"WfW",它們分別代表Windows
              NT  Server,Windows NT Workstation,Windows 95和Windows for Workgroups.除非有特殊的需
              要不想讓samba以windows  NT的身份出現,一般不要改動這個選項,因爲這可能會影響samba作爲
              瀏覽服務器的正確性.

              缺省設置: announce as = NT Server

              示例: announce as = Win95

       announce version (G)
              此選項定義nmbd用於聲明服務器版本號的主版本號和次版本號.缺省版本號的是4.9。除非有特
              殊的必要想將samba設爲低版本,一般不要改動這個選項.

              缺省設置: announce version = 4.9

              示例: announce version = 2.0

       auth methods (G)
              This option allows the administrator to chose what authentication methods smbd will
              use  when  authenticating  a user. This option defaults to sensible values based on
              security. This should be considered a  developer  option  and  used  only  in  rare
              circumstances.  In  the  majority  (if  not all) of production servers, the default
              setting should be adequate.

              Each entry in the list attempts to authenticate the user in turn,  until  the  user
              authenticates.  In  practice only one method will ever actually be able to complete
              the authentication.

              Possible options include guest (anonymous access), sam (lookups in  local  list  of
              accounts  based  on  netbios  name  or  domain name), winbind (relay authentication
              requests for remote users  through  winbindd),  ntdomain  (pre-winbindd  method  of
              authentication  for  remote  domain users; deprecated in favour of winbind method),
              trustdomain (authenticate trusted users by contacting the remote DC  directly  from
              smbd; deprecated in favour of winbind method).

              缺省設置: auth methods = <空字符串>

              示例: auth methods = guest sam winbind

       auto services (G)
              與 preload 同義.

       available (S)
              這個選項可以用來關掉一個服務項.如果available = no,那麼所有對該服務的連接都會失敗.而
              這些失敗會被記錄下來.

              缺省設置: available = yes

       bind interfaces only (G)
              這個全局選項允許samba管理員限制一臺主機的某一個網絡接口用於響應請求.這會對
              於smbd(8)文件服務和nmbd(8)名字服務造成些許影響.

              對於名字服務,它將使nmbd 綁定到'interfaces'選項裏列出的網絡接口的137和138端口上.爲了
              讀取廣播消息,nmbd也會綁定到"所有地址"接口(0.0.0.0)的137和138端口上.如果沒有設置這個
              選項,nmbd將在所有的接口上響應名字服務請求.如果設置了"bind    interfaces    only",那
              麼nmbd將在廣播接口上檢查任何分組的源地址,丟棄任何不匹配interfaces選項所列接口之廣播
              地址的分組.當在其它接口上收到單播分組,此選項使nmbd拒絕對任何不是是interfaces選項所
              列接口來發送分組的主機的服務.IP源地址哄騙可以使這個簡單的檢查失效,所以不要將nmbd安
              全功能用於嚴肅場合.

              對於文件服務,該選項使smbd(8)只在'interfaces'選項所列的網絡接口上綁定.這就限制smbd
              只響應那些接口上發出的分組.注意,不應該在PPP和時斷時續的機器上或非廣播網絡接口上使用
              這個選項,因爲它處理不了非永久連接的接口.

              如果設置了bind interfaces only,除非網絡地址127.0.0.1被加到interfaces選項的列表中,否
              則smbpasswd(8)和swat(8) 可能不會象我們所期望的那樣工作,原因如下:

              爲了改變用戶SMB口令,smbpasswd缺省情況下會以smb客戶端的身份連接本地主機地址localhost
              - 127.0.0.1,發出更改口令請求.如果設置了bind interfaces only,smbpasswd在缺省情況下將
              會連接失敗,除非127.0.0.1已被加入到interfaces選項.另外,可以用-r remote machine選項指
              定本地主機的主網絡接口ip地址,這樣smbpasswd就會強制使用本地的主ip地址.

              swat的狀態頁面會在127.0.0.1嘗試連接smbdnmbd,以確定它們是否正在運行.如果不加
              入127.0.0.1,將會使smbdnmbd 總表示沒有運行甚至實際情況並不是這樣.這就阻止了 swat啓
              動/停止/重啓動smbdnmbd進程.

              缺省設置: bind interfaces only = no

       blocking locks (S)
              此項控制在客戶爲了在打開文件處獲得一個字節範圍的鎖定而發出請求時smbd(8)的動作,同時
              該請求會有一個與之相關的時限.

              如果設置了這個選項,鎖定範圍請求不能立即滿足的話,samba將會在內部對請求進行排隊,並且
              週期性地嘗試獲得鎖定,直到超時.

              如果這個選項設置爲no,samba就會同以前版本那樣,在鎖定範圍無法獲得時立即使鎖定請求失
              敗.

              缺省設置: blocking locks = yes

       block size (S)
              This parameter controls the behavior of smbd(8) when reporting disk free sizes.  By
              default, this reports a disk block size of 1024 bytes.

              Changing  this  parameter  may have some effect on the efficiency of client writes,
              this  is  not  yet  confirmed.  This  parameter  was  added   to   allow   advanced
              administrators  to change it (usually to a higher value) and test the effect it has
              on  client  write  performance  without  re-compiling  the  code.  As  this  is  an
              experimental option it may be removed in a future release.

              Changing  this  option does not change the disk free reporting size, just the block
              size unit reported to the client.

       browsable (S)
              與 browseable 同義。

       browseable (S)
              這個選項控制共享資源在可獲得共享列表、net view命令及瀏覽列表裏是否可見.

              缺省設置: browseable = yes

       browse list (G)
              它控制smbd(8)是否執行一個NetServerEnum調用來爲客戶提供一個瀏覽列表.正常情況它被設
              爲yes.這個選項可能永遠不需要改動.

              缺省設置: browse list = yes

       case sensitive (S)
              參見NAME MANGLING段的討論.

              缺省設置: case sensitive = no

       casesignames (S)
              與 case sensitive 同義.

       change notify timeout (G)
              samba允許客戶端告訴服務器監視某個特定目錄的任何變化,僅當有變化發生的時候回覆SMB請
              求.這種連續不斷的掃描在unix系統上代價很高,因此,smbd(8)只在等待change         notify
              timeout時間後纔對每個請求的目錄執行一次掃描.

              缺省設置: change notify timeout = 60

              示例: change notify timeout = 300

              這將把掃描時間改爲每5分鐘一次.

       change share command (G)
              Samba  2.2.0  introduced  the  ability to dynamically add and delete shares via the
              Windows NT 4.0 Server Manager. The change  share  command  is  used  to  define  an
              external  program  or  script  which  will modify an existing service definition in
              smb.conf. In order to successfully execute the change share command, smbd  requires
              that the administrator be connected using a root account (i.e. uid == 0).

              When  executed,  smbd  will automatically invoke the change share command with four
              parameters.

              configFile - the location of the global smb.conf file.

              shareName - the name of the new share.

              pathName - path to an **existing** directory on disk.

              comment - comment string to associate with the new share.

              This parameter is only used modify existing  file  shares  definitions.  To  modify
              printer shares, use the "Printers..." folder as seen when browsing the Samba host.

              參見 add share command, delete share command.

              缺省設置: none

              示例: change share command = /usr/local/bin/addshare

       client lanman auth (G)
              This  parameter determines whether or not smbclient(8) and other samba client tools
              will attempt to authenticate itself to servers using  the  weaker  LANMAN  password
              hash.  If  disabled,  only  server  which  support NT password hashes (e.g. Windows
              NT/2000, Samba, etc... but not Windows 95/98) will be able to be connected from the
              Samba client.

              The  LANMAN  encrypted  response  is  easily  broken,  due to it's case-insensitive
              nature, and the choice of algorithm. Clients  without  Windows  95/98  servers  are
              advised to disable this option.

              Disabling this option will also disable the client plaintext auth option

              Likewise,  if  the client ntlmv2 auth parameter is enabled, then only NTLMv2 logins
              will be attempted. Not all servers support NTLMv2, and most  will  require  special
              configuration to us it.

              Default : client lanman auth = yes

       client ntlmv2 auth (G)
              This  parameter determines whether or not smbclient(8) will attempt to authenticate
              itself to servers using the NTLMv2 encrypted password response.

              If enabled, only an NTLMv2 and LMv2 response (both much more  secure  than  earlier
              versions) will be sent. Many servers (including NT4 < SP4, Win9x and Samba 2.2) are
              not compatible with NTLMv2.

              Similarly, if enabled,  NTLMv1,  client  lanman  auth  and  client  plaintext  auth
              authentication will be disabled. This also disables share-level authentication.

              If  disabled, an NTLM response (and possibly a LANMAN response) will be sent by the
              client, depending on the value of client lanman auth.

              Note that  some  sites  (particularly  those  following  'best  practice'  security
              polices) only allow NTLMv2 responses, and not the weaker LM or NTLM.

              Default : client ntlmv2 auth = no

       client plaintext auth (G)
              Specifies  whether a client should send a plaintext password if the server does not
              support encrypted passwords.

              缺省設置: client plaintext auth = yes

       client schannel (G)
              This controls whether the client offers or even demands the  use  of  the  netlogon
              schannel.  client schannel = no does not offer the schannel, server schannel = auto
              offers the schannel but does not enforce it,  and  server  schannel  =  yes  denies
              access if the server is not able to speak netlogon schannel.

              缺省設置: client schannel = auto

              示例: client schannel = yes

       client signing (G)
              This  controls  whether the client offers or requires the server it talks to to use
              SMB signing. Possible values are auto, mandatory and disabled.

              When set to auto, SMB signing is offered, but not enforced. When set to  mandatory,
              SMB signing is required and if set to disabled, SMB signing is not offered either.

              缺省設置: client signing = auto

       client use spnego (G)
              This  variable  controls  controls whether samba clients will try to use Simple and
              Protected NEGOciation (as specified by  rfc2478)  with  WindowsXP  and  Windows2000
              servers  to  agree  upon an authentication mechanism. SPNEGO client support for SMB
              Signing is currently broken, so you  might  want  to  turn  this  option  off  when
              operating with Windows 2003 domain controllers in particular.

              缺省設置: client use spnego = yes

       comment (S)
              這是一段當客戶用網上鄰居(net view)察看服務器上共享資源時顯示的說明文字.

              如果想設置機器名後的說明文字請參考  server string 命令.

              缺省設置: No comment string

              示例: comment = Fred's Files

       config file (G)
              這可以使samba使用指定的配置文件來替代缺省的配置文件,(通常是smb.conf).如果設置了這個
              選項,會出現一個先有雞還是先有蛋的問題!

              由於這個原因,如果在加載這個選項的時候發現配置文件名變化了,就會從新的配置文件裏重新
              加載選項.

              這個選項作爲常用的替換非常有用.

              如果這個配置文件不存在,那麼就不會被加載.(允許你特殊地處理少數客戶的配置文件)

              示例: config file = /usr/local/samba/lib/smb.conf.%m

       copy (S)
              這使你可以克隆服務. 指定的服務以當前服務的名字進行簡單的複製,當前服務裏定義的選項將
              替代被拷服務裏任何相應的選項.

              這個特性允許建立一個服務的'模版',可以很容易的生成相似的服務.注意,被拷貝的服務在配置
              文件裏必須先於拷貝的服務出現.

              缺省設置: no value

              示例: copy = otherservice

       create mask (S)
              與 create mode 同義.

              當生成一個文件的時候,需要知道從dos模式映射到unix下的文件權限.最後的結果用這個參數進
              行逐位的與運算得到.這個選項可以理解成unix下文件的位掩碼.在生成文件的時候,任何沒有設
              置的位將會從創建模式中去掉.

              這個選項的缺省值是從unix的文件創建模式中去掉組和其他用戶的寫和執行標誌位.

              根據這個規則,samba將會把這個選項生成的unix文件創建模式和由force create mode設置的選
              項進行逐位的或運算,force create mode 的缺省選項是000.

              這個選項不會影響目錄創建模式.細節參見directory mode  .

              參考force    create     mode以進一步瞭解在創建文件時設置的特殊位.關於創建目錄模式參
              見directory mode選項.參見 inherit permissions parameter.

              Note  that  this parameter does not apply to permissions set by Windows NT/2000 ACL
              editors. If the administrator wishes to enforce a  mask  on  access  control  lists
              also, they need to set the security mask.

              缺省設置: create mask = 0744

              示例: create mask = 0775

       create mode (S)
              與  create mask 同義.

       csc policy (S)
              This  stands  for  client-side caching policy, and specifies how clients capable of
              offline caching will cache the files in the share. The valid  values  are:  manual,
              documents, programs, disable.

              These values correspond to those used on Windows servers.

              For  example,  shares containing roaming profiles can have offline caching disabled
              using csc policy = disable.

              缺省設置: csc policy = manual

              示例: csc policy = programs

       deadtime (G)
              這個值(十進制整數)定義連接發呆超時,單位是分鐘.如果一個連接發超過了這個時間就會被斷
              開.如果有文件被打開了,這個時間就不起作用.

              這可以保護服務器不被過多的發呆連接耗盡資源.

              多數客戶端有連接斷開後的自動重連功能,所以大多數情況下,這個選項對用戶應該是透明的

              對多數系統建議使用較短的發呆超時的選項.

              發呆超時選項被設爲0意味着不會自動斷開連接..

              缺省設置: deadtime = 0

              示例: deadtime = 15

       debug hires timestamp (G)
              有些時候記錄信息需要比秒更高層次的時間標識,用這個布爾量選項可以向時間標識信息頭中加
              入以微秒級的頻率.

              注意要使用這個選項,必須打開 debug timestamp選項.

              缺省設置: debug hires timestamp = no

       debuglevel (G)
              與  log level 同義.

       debug pid (G)
              爲很多從smbd(8)fork出來的進程使用同一個記錄文件時,很難精確地跟蹤信息是哪個進程輸出
              的.用這個布爾量選項向時間標識信息頭中自動添加進程號.

              注意要使用這個選項,必須打開 debug timestamp 選項.

              缺省設置: debug pid = no

       debug timestamp (G)
              samba缺省會給調試紀錄信息加上時間標識.如果運行的是高級別debug  level的調試,這個時間
              標識可以被轉移.用這個選項可以將時間標識關閉.

              缺省設置: debug timestamp = yes

       debug uid (G)
              samba有時以root身份運行,而有時以已聯接的用戶來運行.使用這個布爾量選項可以向記錄文件
              的時間標識信息頭中自動插入當前的euid,egid,uid和gid標識.

              Note  that  the parameter  must be on for this to have an effect.  注意要使用這個選
              項,必須打開 debug timestamp選項.

              缺省設置: debug uid = no

       default (G)
              與  default service 同義.

       default case (S)
              參見"NAME MANGLING"段. 也注意一下short preserve case選項.

              缺省設置: default case = lower

       default devmode (S)
              This parameter is only applicable to  printable  services.  When  smbd  is  serving
              Printer Drivers to Windows NT/2k/XP clients, each printer on the Samba server has a
              Device Mode which defines things such as paper  size  and  orientation  and  duplex
              settings.  The  device  mode  can only correctly be generated by the printer driver
              itself (which can only be executed on a Win32 platform). Because smbd is unable  to
              execute the driver code to generate the device mode, the default behavior is to set
              this field to NULL.

              Most problems with serving printer drivers  to  Windows  NT/2k/XP  clients  can  be
              traced  to a problem with the generated device mode. Certain drivers will do things
              such as crashing the client's Explorer.exe with  a  NULL  devmode.  However,  other
              printer  drivers can cause the client's spooler service (spoolsv.exe) to die if the
              devmode was not created by  the  driver  itself  (i.e.  smbd  generates  a  default
              devmode).

              This  parameter  should  be  used  with  care and tested with the printer driver in
              question. It is better to leave the device mode to NULL and let the Windows  client
              set  the  correct  values.  Because  drivers  do  not do this all the time, setting
              default devmode = yes will instruct smbd to generate a default one.

              For more information on Windows NT/2k printing  and  Device  Modes,  see  the  MSDN
              documentation.

              缺省設置: default devmode = no

       default service (G)
              這個選項定義一個當指定服務找不到時的缺省服務.注意,在選項值裏沒有方括號(看示例!).

              這個選項沒有缺省值. 如果沒給出這個選項的話,對不存在的服務的請求將返回錯誤.

              缺省服務一般是那些允許guest ok, read-only的服務.

              外在的服務名可能被替換成請求的服務名,這樣就可以用象%S這樣的宏來做一個通用的服務.

              注意在缺省服務選項指定的服務名裏, 字符'_'被映射爲'/'. 這樣可能會出現有趣的事情.

              示例:

              [global]
                   default service = pub
              [pub]
                   path = /%S

       delete group script (G)
              This is the full pathname to a script that will be run AS ROOT smbd(8) when a group
              is requested to be deleted. It will expand any %g to the group  name  passed.  This
              script  is only useful for installations using the Windows NT domain administration
              tools.

       deleteprinter command (G)
              With the introduction of MS-RPC based printer support for Windows  NT/2000  clients
              in  Samba  2.2,  it  is  now  possible to delete printer at run time by issuing the
              DeletePrinter() RPC call.

              For a Samba host this means that  the  printer  must  be  physically  deleted  from
              underlying  printing  system. The  deleteprinter command defines a script to be run
              which will perform the necessary operations for removing the printer from the print
              system and from smb.conf.

              The  deleteprinter  command  is  automatically  called  with  only  one  parameter:
              "printer name".

              Once the deleteprinter command has been executed, smbd will reparse  the   smb.conf
              to  associated printer no longer exists. If the sharename is still valid, then smbd
              will return an ACCESS_DENIED error to the client.

              參見  addprinter command, printing, show add printer wizard

              缺省設置: none

              示例: deleteprinter command = /usr/bin/removeprinter

       delete readonly (S)
              這個選項允許刪除只讀文件,這個只讀不是通常dos裏的含義,而是unix中的.

              這個選項對於rcs這樣的應用很有用,在這種情況下,unix文件的屬主不允許改變權限,dos文件只
              讀.

              缺省設置: delete readonly = no

       delete share command (G)
              Samba  2.2.0  introduced  the  ability to dynamically add and delete shares via the
              Windows NT 4.0 Server Manager. The delete  share  command  is  used  to  define  an
              external  program  or  script which will remove an existing service definition from
              smb.conf. In order to successfully execute the delete share command, smbd  requires
              that the administrator be connected using a root account (i.e. uid == 0).

              When  executed,  smbd  will  automatically invoke the delete share command with two
              parameters.

              configFile - the location of the global smb.conf file.

              shareName - the name of the existing service.

              This parameter is only used to remove file shares. To delete  printer  shares,  see
              the deleteprinter command.

              參見 add share command, change share command.

              缺省設置: none

              示例: delete share command = /usr/local/bin/delshare

       delete user from group script (G)
              Full  path  to  the  script that will be called when a user is removed from a group
              using the Windows NT domain administration tools. It will  be  run  by  smbd(8)  AS
              ROOT.  Any %g will be replaced with the group name and any %u will be replaced with
              the user name.

              缺省設置: delete user from group script =

              示例: delete user from group script = /usr/sbin/deluser %u %g

       delete user script (G)
              它定義一個在使用RPC(NT)工具管理用戶時,fBsmbd(8)以root身份運行的包括路徑的一個腳本.

              當遠程客戶使用'User Manager for Domains' 或是 rpcclient  從服務器上刪除一個用戶時執
              行此操作。

              這個腳本刪除給定的unix用戶。

              缺省設置: delete user script = <空字符串>

              示例: delete user script = /usr/local/samba/bin/del_user %u

       delete veto files (S)
              這個選項用於samba試圖刪除一個或多個包含禁止文件的目錄的情況(參見veto files選項). 如
              果這個選項設置爲no(缺省情況),那麼如果一個禁止目錄裏包含了任何非禁止的文件或目錄,刪
              除就會失敗.這通常正是你所希望的.

              如果這個選項被設爲了 yes,Samba將試圖遞歸刪除在被禁止目錄裏的任何文件和目錄.這對於整
              合象NetAtalk這樣的文件服務系統很有用,它通常會在目錄裏生成Dos/windows用戶看不見的中
              間文件(e.g. .AppleDouble).

              設置delete  veto files = yes 使那些有權限的用戶可以在刪除父目錄的時候透明的刪除子目
              錄.

              參見 veto files 選項.

              缺省設置: delete veto files = no

       deny hosts (S)
              與 hosts deny 同義.

       dfree command (G)
              dfree  command只需在磁盤空間計算有問題的系統上使用.這個空間計算的問題僅在Ultrix系統
              上發生過,但在其他的操作系統上也有可能發生.發生這個問題的現象是在每個目錄列表最後發
              生錯誤並提示"Abort Retry Ignore".

              這個設置允許用外部程序代替內部程序來計算總共的磁盤空間和可用的磁盤空間.下面的例子給
              出了一個能完成這個功能的腳本.

              這個外部程序的輸入是文件系統裏一個需要計算的目錄,典型的包括./字符串.以ascii碼返回兩
              個整數.第一個是總共的磁盤空間(以塊爲單位),第二個是可用塊樹.可選的第三個返回值可以以
              字節爲單位給出塊的大小.缺省的塊的大小是1024字節.

              注意:這個腳本應該屬主爲root,只有root可寫,並且不能帶有用戶標識位和組標識位(setuid or
              setgid)!

              缺省設置: 缺省用內部程序來計算磁盤容量和可用空間.

              示例: dfree command = /usr/local/samba/bin/dfree

              如下這個dfree腳本必須是可執行的.

              #!/bin/sh
              df $1 | tail -1 | awk '{print $2" "$4}'

              在Sys V一類的系統上可能是:

              #!/bin/sh
              /usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'

              注意在特定的系統上可能需要給出相應的帶有全路徑的命令.

       directory (S)
              與 path 同義.

       directory mask (S)
              這個選項是8進制的模式。用來控制在生成UNIX目錄時,將其從dos模式轉換爲unix模式。

              當生成一個路徑的時候,必須指定的目錄權限從dos模式映射到unix模式,然後這個結果和這個選
              項進行逐位的與運算.這個選項可以理解成unix模式下的位掩碼.這個選項裏任何沒有設置的位
              在生成unix下的目錄時將會被去掉

              缺省情況下,這個選項把組和其他用戶的寫權限位去掉,只允許目錄的屬主對目錄進行修改.

              Samba將把這個選項和force  directory   mode的選項進行逐位的或運算,這個選項缺省時設置
              爲000(也就是不加額外的限制).

              Note  that  this parameter does not apply to permissions set by Windows NT/2000 ACL
              editors. If the administrator wishes to enforce a  mask  on  access  control  lists
              also, they need to set the directory security mask.

              在生成目錄時如果需要設置特殊的模式位,參見force directory mode選項.

              關於生成文件時的模式位參見create mode 選項和directory security mask選項.

              Also refer to the  inherit permissions parameter.

              缺省設置: directory mask = 0755

              示例: directory mask = 0775

       directory mode (S)
              與  directory mask 同義。

       directory security mask (S)
              此選項控制了NT客戶在他的本地NT安全對話框中操縱unix目錄權限時可以修改哪些權限位.

              這個選項以掩碼來實現改變權限位,所以在修改時要防止不在掩碼中涉及的那些位.實際上,在這
              個掩碼中的位0可以使用戶無法改變任何東東.

              如果沒有明確設定的話,這個選項會用與directory  mask選項同樣的值.要允許用戶在目錄中可
              以修改所有的user/group/world權限,可以把這個選項設爲0777.

              注意,能訪問samba服務器的用戶通過其它方法也可以很容易地繞過這個限制,所以對獨立工作的
              系統來說這個選項是最根本最有用的.很多系統管理的管理員都會把它設爲默認的0777.

              參見 force directory security mode, security mask, force security mode  選項。

              缺省設置: directory security mask = 0777

              示例: directory security mask = 0700

       disable netbios (G)
              Enabling this parameter will disable netbios support in Samba. Netbios is the  only
              available form of browsing in all windows versions except for 2000 and XP.

              Note  that clients that only support netbios won't be able to see your samba server
              when netbios support is disabled.

              缺省設置: disable netbios = no

              示例: disable netbios = yes

       disable spoolss (G)
              Enabling this parameter will disable Samba's support for the  SPOOLSS  set  of  MS-
              RPC's  and  will  yield  identical behavior as Samba 2.0.x. Windows NT/2000 clients
              will downgrade to using Lanman style  printing  commands.  Windows  9x/ME  will  be
              uneffected  by  the  選項。  However,  this will also disable the ability to upload
              printer drivers to a Samba server via the Windows NT Add Printer Wizard or by using
              the  NT  printer  properties  dialog window. It will also disable the capability of
              Windows NT/2000 clients to download print drivers from the Samba host upon  demand.
              Be very careful about enabling this 選項。

              See also use client driver

              Default : disable spoolss = no

       display charset (G)
              Specifies  the  charset  that samba will use to print messages to stdout and stderr
              and SWAT will use. Should generally be the same as the unix charset.

              缺省設置: display charset = ASCII

              示例: display charset = UTF8

       dns proxy (G)
              指定nmbd(8)象WINS服務器那樣尋找沒有登記的NetBIOS名,象對待DNS名那樣逐字的對
              待NetBIOS名,向DNS服務器查詢該名稱所代表的客戶端.

              注意,NetBISO名的最大長度是15個字符,所以DNS名(或DNS別名)同樣最多隻能有15個字符.

              nmbd 在做DNS名查詢的時候將自身複製一份,因爲域名查詢是一個阻塞的動作.

              參見  wins support 。

              缺省設置: dns proxy = yes

       domain logons (G)
              如果這個選項爲yes,Samba服務器將爲workgroup提供Windows  95/98 登陸域服務.Samba 2.2只
              能實現Windows NT 4 域中域控制器的有限功能。有關設置這個功能的更詳細信息參見Samba 文
              檔中的Samba-PDC-HOWTO。

              缺省設置: domain logons = no

       domain master (G)
              這個選項告訴smbd(8)收集廣域網內的瀏覽列表.設置這個選項後,nmbd用一個特定的NetBIOS名
              向它的工作組標識它自己是一個主控瀏覽器.在同一工作組不同子網中的本地主控瀏覽器將把自
              己的瀏覽列表傳給nmbd,然後向smbd(8)  請求整個網絡上瀏覽列表的完整拷貝.客戶端將和他們
              的本地主控瀏覽器聯繫,得到整個域範圍內的瀏覽列表,而不只是子網上的列表.

              注意,windows  NT主域控制器默認情況總是佔有這個在工作組中的特殊的NetBIOS名,宣稱自己
              是工作組的主域瀏覽器(也就是說,沒有什麼方法可以阻止一個Windows  NT主域控制器這樣做).
              這樣如果設置了這個選項,並且nmbd 在Windows NT之前向工作組宣稱了這個特殊的名字,那麼跨
              子網的瀏覽行爲會變得奇怪,並且可能會失敗.

              If  domain  logons = yes , then the default behavior is to enable the domain master
              選項。 If domain logons is not enabled (the default  setting),  then  neither  will
              domain master be enabled by default.

              缺省設置: domain master = auto

       dont descend (S)
              有些系統上存在某些特殊的路徑(比如linux中的/proc),這些目錄不需要(也不希望)客戶端關
              心,甚至可能具有無限的層次深度(遞歸的).這個選項允許你指定一個由逗號分隔的列表,服務器
              將把列表內包含的目錄始終顯示成空目錄.

              注意,Samba對'dont descend'選項的輸入格式十分挑剔.例如他也許要求你輸入./proc而不是僅
              僅是/proc.實踐是最好的策略.

              缺省設置: none (也就是說,所有目錄的內容會正常的傳遞給客戶端)

              示例: dont descend = /proc,/dev

       dos charset (G)
              DOS SMB clients assume the server has the same charset  as  they  do.  This  option
              specifies which charset Samba should talk to DOS clients.

              The  default  depends  on  which  charsets  you  have installed. Samba tries to use
              charset 850 but falls back to ASCII in case it is not available. Run testparm(1) to
              check the default on your system.

       dos filemode (S)
              The default behavior in Samba is to provide UNIX-like behavior where only the owner
              of a file/directory is able to change the permissions on it. However, this behavior
              is  often confusing to DOS/Windows users. Enabling this parameter allows a user who
              has write access to the file (by whatever means) to modify the permissions  on  it.
              Note  that  a  user  belonging  to the group owning the file will not be allowed to
              change permissions if the group is only  granted  read  access.  Ownership  of  the
              file/directory is not changed, only the permissions are modified.

              缺省設置: dos filemode = no

       dos filetime resolution (S)
              在DOS和Windows FAT文件系統中,時間的計量精度是2秒。對共享資源設置這個選項,可以使得在
              一個向smbd(8)的查詢需要1秒精度時,Samba把報告的時間精度降低到2秒左右。

              這個選項的主要用於解決Visual  C++與Samba的兼容性問題.當共享文件被鎖定時(oplocks選項
              被設置爲允許),Visual  C++使用兩個不同的讀取時間的函數調用來檢查文件自從最後一次讀操
              作以來是否有改變.其中一個函數使用1秒的時間尺度,而另一個則使用2秒的時間尺度.由於使用
              基於2秒的方法要捨去任何的奇數秒,當文件的時間記錄是奇數秒時,Visual C++的兩次函數調用
              結果就會不一致,Visual  C++就會總是認爲文件被改變.設置這個選項可以使得兩次函數調用的
              結果一致,Visual C++會很高興的接受這一切.

              缺省設置: dos filetime resolution = no

       dos filetimes (S)
              在DOS和Windows操作系統中,如果用戶對文件進行寫操作,就會改變文件的時間記錄.而
              在POSIX規則中,只有文件的所有者和root纔有改變文件時間記錄的能力.缺省的,Samba按
              照POSIX規則運行,如果smbd的用戶不是文件的所有者,那麼他對文件的操作不會改變文件的時間
              記錄.如果設置這個選項爲  yes,那麼smbd(8)就按照DOS的規則運行,並且按照DOS系統的要求改
              變文件的時間記錄.

              缺省設置: dos filetimes = no

       enable rid algorithm (G)
              This  option is used to control whether or not smbd in Samba 3.0 should fallback to
              the algorithm used by Samba 2.2 to generate  user  and  group  RIDs.  The  longterm
              development goal is to remove the algorithmic mappings of RIDs altogether, but this
              has proved to be difficult. This parameter is mainly provided  so  that  developers
              can turn the algorithm on and off and see what breaks. This parameter should not be
              disabled by non-developers because certain features in  Samba  will  fail  to  work
              without it.

              缺省設置: enable rid algorithm = <yes>

       encrypt passwords (G)
              這個布爾型值控制着是否與客戶端用加密口令進行交談.注意,NT4.0  SP3  及以上還有WINDOWS
              98在缺省情況下使用加密口令進行交談,除非改變了註冊表的相應健值.想要使用加密口令,清參
              閱Samba HOWTO Collection中的 "User Database" 章節。

              想要使加密口令能正確的工作,  smbd(8)必須能訪問本地的smbpasswd(5)文件(如何正確設置和
              維護這個文件,請參閱smbpasswd(8)手冊),或者,設置選項security=  [server|domain|ads],這
              樣設置將使得smbd依賴其它的服務器來幫它鑑別口令.

              缺省設置: encrypt passwords = yes

       enhanced browsing (G)
              This  option  enables  a  couple of enhancements to cross-subnet browse propagation
              that  have  been  added  in  Samba  but  which  are  not  standard   in   Microsoft
              implementations.

              The first enhancement to browse propagation consists of a regular wildcard query to
              a Samba  WINS  server  for  all  Domain  Master  Browsers,  followed  by  a  browse
              synchronization  with each of the returned DMBs. The second enhancement consists of
              a regular randomised browse synchronization with all currently known DMBs.

              You may wish to disable this option if you have a problem with empty workgroups not
              disappearing  from  browse  lists.  Due to the restrictions of the browse protocols
              these enhancements can cause a empty workgroup to stay around forever which can  be
              annoying.

              In  general  you  should  leave this option enabled as it makes cross-subnet browse
              propagation much more reliable.

              缺省設置: enhanced browsing = yes

       enumports command (G)
              The concept of a "port" is fairly foreign to  UNIX  hosts.  Under  Windows  NT/2000
              print  servers,  a  port  is associated with a port monitor and generally takes the
              form of a local port (i.e. LPT1:, COM1:, FILE:) or a remote  port  (i.e.  LPD  Port
              Monitor,  etc...).  By  default,  Samba  has  only one port defined--"Samba Printer
              Port". Under Windows NT/2000, all printers must have a valid port name. If you wish
              to  have  a  list  of ports displayed (smbd  does not use a port name for anything)
              other than the default "Samba Printer Port", you can define  enumports  command  to
              point to a program which should generate a list of ports, one per line, to standard
              output. This listing will then be used in response to the level 1 and 2 EnumPorts()
              RPC.

              缺省設置: no enumports command

              示例: enumports command = /usr/bin/listports

       exec (S)
              與 preexec 同義。

       fake directory create times (S)
              NTFS和Windows  VFAT文件系統爲每一個文件和目錄保留一個創建時間. 這個時間和UNIX下的狀
              態改變時間--ctime不同. 所以, 在缺省狀態下,  Samba將報告UNIX系統所保持的各種時間屬性
              中的最早的那個作爲(文件/目錄)建立時間.    如果在一個共享中設置了這個選項,    將會使
              得Samba僞造一個目錄生成時間, 這個時間就是1980.01.01的午夜.

              這個選項的主要用於解決Visual C++與Samba的兼容性問題.Visual  C++生成makefiles文件時,
              包含目標文件所依賴的目的目錄. 包含建立目錄的規則. 同樣的, 當NMAKE比較時間屬性時, 它
              檢查目錄建立時間. 目標目錄不存在的話, 會建立一個;如果存在,它的建立時間總是比它所包
              含的目標文件的建立時間早.

              UNIX的時間規則意味着只要有文件在共享目錄中建立或刪除,Samba將更新關於該目錄建立時間
              的報告.  NMAKE將發現目錄中除了最後建立的文件以外的所有目標文件都過期了(與目錄的建立
              時間相比較),  然後重新編譯目標文件.設置這個選項值將保證目錄的建立時間早於它裏面的文
              件,NMAKE就能夠正常工作.

              缺省設置: fake directory create times = no

       fake oplocks (S)
              oplocks是這樣一個選項,  它允許SMB客戶端在本地緩存對服務器的文件操作.   如果服務器允
              許oplock(opportunistic  lock)操作,  客戶端可以簡單的認爲, 它自己是唯一的文件訪問者,
              可以隨意的緩存文件. 有些oplocks類型甚至允許緩存文件的打開和關閉操作. 這個操作換來性
              能上的巨大提升.

              當你設置fake  oplocks = yes後,smbd(8)總是允許oplock請求, 而不管到底有多少的客戶端在
              使用這個文件.

              在通常情況下, 使用真實的oplocks支持總是比使用這個選項好.

              如果你使用這個選項在一些只讀的共享上(例如:  CDROM共享),或者你知道這個共享只能夠被一
              個客戶端所訪問(例如:  客戶主目錄). 你將會注意到性能上的重大提升. 如果你將這個選項用
              在多個客戶端都可以讀寫的共享上, 由於客戶可能同時訪問一個共享文件,  這樣會造成文件損
              壞. 請一定小心使用.

              缺省設置: fake oplocks = no

       follow symlinks (S)
              這個選項允許Samba管理員禁止某個特殊共享下smbd(8)對符號鏈接的訪問.    將這個選項設置
              爲no將會阻止這個共享下的任何鏈接形式的文件或目錄被查看(用戶將會得到一個錯誤信息).例
              如:  這個選項將阻止客戶將/etc/passwd文件鏈接到自己的主目錄.  (我們看到,  這是很有用
              的). 但是, 它將會使文件名字的查找速度慢一些.

              這個選項缺省是允許(也就是, smbd將允許訪問符號鏈接)

              缺省設置: follow symlinks = yes

       force create mode (S)
              這個選項設置一組UNIX格式的權限代碼, 當Samba建立新文檔的時候, 總是會使用這個權限設置
              新文檔, 通過將新文檔的權限位和這組權限代碼做逐位與, 就完成了設置工作.缺省狀態下, 這
              個選項設置爲八進制000,在create mask加到新建立的文件的權限位上後, 與這個值進行按位與
              操作, 就得到文件建立時的權限設置.

              參見 create mask 來獲得關於建立文件時的掩碼的詳細資料。

              另外也參見 inherit permissions 參數.

              缺省設置: force create mode = 000

              示例: force create mode = 0755

              這個例子中,   將迫使所有被建立的文檔對"同組/其它(用戶)"有讀和執行權.   對用戶自己有
              讀/寫/執行權力.

       force directory mode (S)
              這個選項設置一組UNIX格式的權限代碼, 當Samba建立新目錄的時候, 總是會使用這個權限設置
              新目錄, 通過將新目錄的權限位和這組權限代碼做逐位與, 就完成了設置工作.缺省狀態下, 這
              個選項設置爲八進制000,在directory mask加到新建立的目錄的權限位上後,與這個值進行按位
              與操作, 就得到目錄建立時的權限設置.

              參見 directory mask 來獲得關於建立目錄時的掩碼的詳細資料。

              另外也參見 inherit permissions參數.

              缺省設置: force directory mode = 000

              示例: force directory mode = 0755

              這個例子中,   將迫使所有被建立的目錄對"同組/其它(用戶)"有讀和進入權.   對用戶自己有
              讀/寫/進入權力.

       force directory security mode (S)
              此選項控制NT用戶通過本地NT安全對話框可以操作哪些目錄上的unix權限位.

              此選項以掩碼('or')來實現權限位的改變,所以它強制了任何掩碼中用戶可以更改的位.實際
              上,當在修改目錄的安全性時,這個掩碼中的一個0位可以作爲一組用戶已經設爲'on'的位來看
              待.

              如果沒有明確設定的話,這個選項會用與force directory  mode選項同樣的值.要允許用戶在目
              錄中可以修改所有的user/group/world權限,可以把這個選項設爲0000.

              注意,能訪問samba服務器的用戶通過其它方法也可以很容易地繞過這個限制,所以這個參數只對
              獨立工作的應用系統來說有用.很多系統管理的管理員都會把它設爲默認的0000.

              參見 directory security mask, security mask, force security mode  參數。

              缺省設置: force directory security mode = 0

              示例: force directory security mode = 700

       force group (S)
              這個選項指定一個UNIX組, 所有連接到服務上的用戶都被強迫使用這個組作爲"主組".  所有訪
              問文件的用戶都使用這個組的訪問權限做權限檢查.  因此, 通過分配文件和目錄的訪問權限給
              這個用戶組, Samba的管理員可以限制或允許對共享文件的訪問.

              在samba  2.0.5及更新的版本中這個選項已經按下面的方法有了一些擴展功能.如果在此列出的
              組名有一個'+'字符加在名稱前的話,當前用戶正在訪問的共享資源只有初始組被缺省分配到這
              個組中,而可能的情況是用戶已經是其它組成員了.這樣,管理員可以決定只有在特殊組裏的用戶
              才能以設定的組身份建立文件,更有益於所有權分配管理.例如,設定force   group  =  +sys的
              話,只有在sys組裏的用戶才能在訪問samba共享資源時擁有缺省的初始組標識.而其它所有用戶
              保留他們原始的組標識.

              如果又設定了  force user選項的話,force group選項中指定的組將會越過在 force user中指
              定的初始組.  If the force user parameter is also set the group specified  in  force
              group will override the primary group set in force user.

              參見 force user選項.

              缺省設置: no forced group

              示例: force group = agroup

       force security mode (S)
              此選項控制NT用戶通過本地NT安全對話框可以操作哪些目錄上的unix權限位.

              此選項以掩碼('or')來實現權限位的改變,所以它強制了任何掩碼中用戶可以更改的位.實際
              上,當在修改目錄的安全性時,這個掩碼中的一個0位可以作爲一組用戶已經設爲'on'的位來看
              待.

              如果沒有明確設定的話,這個選項會用與force create mode選項同樣的值.要允許用戶在文件上
              可以修改所有的user/group/world權限,可以把這個選項設爲000.

              注意,能訪問samba服務器的用戶通過其它方法可以很容易地繞過這個限制,所以這個選項對獨立
              工作的系統來說纔有用的.很多系統管理的管理員都會把它設爲默認的0000.

              參見 force directory security mode, directory security mask,  security mask 參數。

              缺省設置: force security mode = 0

              示例: force security mode = 700

       force user (S)
              這個選項指定一個UNIX用戶的名字, 所有連接到服務上的用戶的缺省名字就使用這個名字. (由
              於權限的原因)在共享文件時這個選項是有用的.你必須小心使用這個選項,  它有可能帶來安全
              上的問題.

              這個選項只有當一個連接建立起來後纔有用.  在建立連接的使用, 用戶還是必須有合法的用戶
              名和口令. 一旦連接建立起來, 所有的操作將強迫以這個名字進行,  而不管它是以什麼名字登
              錄的.

              samba         2.0.5和更新的版本中這個選項會導致用戶的初始組被作爲所有文件操作的初始
              組.2.0.5以前的初始組被允許作爲聯接用戶的初始組(這是個bug)

              參見 force group 選項。

              缺省設置: no forced user

              示例: force user = auser

       fstype (S)
              這個選項允許管理員設置一個字符串說明共享的文件系統的類型,         當客戶端有查詢時,
              smbd(8)將這個字符串作爲正在使用的文件系統的類型報告給客戶端. 爲了和Windows NT兼容缺
              省值設置是NTFS, 當然,如果必要的話,也可以改變爲其它的字符串,例如SambaFAT.

              缺省設置: fstype = NTFS

              示例: fstype = Samba

       get quota command (G)
              The get quota command should only be used whenever there is no operating system API
              available from the OS that samba can use.

              This  parameter  should  specify  the  path  to  a  script  that  queries the quota
              information for the specified user/group  for  the  partition  that  the  specified
              directory is on.

              Such a script should take 3 arguments:

              directory

              type of query

              uid of user or gid of group

              The type of query can be one of :

              1 - user quotas

              2 - user default quotas (uid = -1)

              3 - group quotas

              4 - group default quotas (gid = -1)

              This script should print its output according to the following format:

              Line  1  -  quota  flags (0 = no quotas, 1 = quotas enabled, 2 = quotas enabled and
              enforced)

              Line 2 - number of currently used blocks

              Line 3 - the softlimit number of blocks

              Line 4 - the hardlimit number of blocks

              Line 5 - currently used number of inodes

              Line 6 - the softlimit number of inodes

              Line 7 - the hardlimit number of inodes

              Line 8(optional) - the number of bytes in a block(default is 1024)

              參見 set quota command 選項。

              缺省設置: get quota command =

              示例: get quota command = /usr/local/sbin/query_quota

       getwd cache (G)
              這是一個性能調節選項. 當這個選項允許時, 一個高速緩衝算法將被用來減少調用"getwd()"的
              時間. 這個選項對性能會產生很大的影響, 特別是在wide links選項設爲no的時候.

              缺省設置: getwd cache = yes

       group (S)
              與 force group 同義。

       guest account (G,S)
              這是一個用來訪問服務的用戶名(作爲客戶來訪賬戶,區別於系統上的用戶), 當然, 被訪問的服
              務必須先設置了選項fI    guest    ok.    這個賬戶所擁有的所有權利都會反映到以"訪問客
              戶(guest)"身份連接進來的客戶身上.  典型的, 這個客戶必須在passwd文件中存在, 但是沒有
              有效的登錄權限.通常系統中存在着名爲"ftp"的賬戶,把這個賬戶名使用在這裏是個好主意.注
              意:如果一個服務指定了一個專用的訪問用戶名,這個專用名將代替這裏的用戶名.

              在某些系統上,缺省的訪問用戶名"nobody"賬戶可能不能打印.如果遇到這種情況,請使用其它的
              賬戶名(例如ftp)。想要測試這種情況,可以試着用來訪賬戶登錄(可以用su  -命令),然後,使用
              系統打印命令lpr(1)或lp(1).

              這個參數不接受%宏,因爲Samba系統的很多組件要正確工作都需要這個值是一個常量。

              缺省設置: 編譯時指定,通常是"nobody"

              示例: guest account = ftp

       guest ok (S)
              如果一個服務的這個選項的值設爲yes, 那末, 連接到這個服務不需要口令, 權限設置爲 guest
              account的權限.

              這個選項抵消了設置 restrict anonymous = 2 的好處。

              參見下面的 security來獲得更多信息。

              缺省設置: guest ok = no

       guest only (S)
              如果一個服務的這個選項設置爲 yes, 那末, 只有客戶(guest)訪問被允許, 也就是說, 不允許
              以其他用戶的身份訪問.如果沒有設置guest ok選項, 則此選項無效.

              參見下面的 security 參數來獲得更多信息。

              缺省設置: guest only = no

       hide dot files (S)
              這是一個布爾值選項.  控制文件名最前面一個字符爲"."的文件是否表現爲隱含文件(UNIX文件
              系統中, 最前面爲"."的文件是隱含文件).

              缺省設置: hide dot files = yes

       hide files (S)
              這是一個隱藏文件或目錄的列表.這些文件不能被看見但是能被訪問.列表中的文件或目錄將被
              賦予DOS下的"隱藏"屬性.

              每個條目必須以"/"分隔以便允許在條目中使用空格.可以使用DOS風格的通配符"*"和"?"匹配多
              個目錄和文件。

              每一個條目必須使用UNIX格式的路徑,而不是DOS格式的路徑,同時,不能包含UNIX路徑分隔
              符"/".

              注意:大小寫敏感的特性也適用於隱含文件.

              設置這個選項會影響Samba的性能,它會迫使系統檢查所有的文件和目錄以確定是否與它的所要
              尋找的項目匹配.

              參見 hide dot files,  veto filescase sensitive.

              缺省設置: 沒有隱藏文件

              示例: hide files = /.*/DesktopFolderDB/TrashFor%m/resource.frk/

              上面的例子中的文件從Thursby共享出來,給Macintosh的SMB客戶端(DAVE),供內部使用,仍然隱
              藏了"."打頭的文件.

       hide local users (G)
              This  parameter  toggles  the hiding of local UNIX users (root, wheel, floppy, etc)
              from remote clients.

              缺省設置: hide local users = no

       hide special files (S)
              This parameter prevents clients from seeing special files such as sockets,  devices
              and fifo's in directory listings.

              缺省設置: hide special files = no

       hide unreadable (S)
              This  parameter  prevents clients from seeing the existance of files that cannot be
              read. Defaults to off.

              缺省設置: hide unreadable = no

       hide unwriteable files (S)
              This parameter prevents clients from seeing the existance of files that  cannot  be
              written to. Defaults to off. Note that unwriteable directories are shown as usual.

              缺省設置: hide unwriteable = no

       homedir map (G)
              如果nis homedir 選項的值爲yes,同時, smbd(8)也作爲win95/98的登錄服務器,那麼,這個選項
              指明一個NIS(或者YP)映射.指向用戶主目錄所在的服務器.目前,只認識Sun的auto.home映射格
              式.映射格式如下:

              username server:/some/file/system

              程序從":"號前取得服務器名字.將來也許會有更好的解釋系統來處理不同的映射格式,當然,也
              包括Amd(另一種自動裝載方式)映射.

              需要系統中有一個運行的NIS客戶來使這個選項工作。

              參見 nis homedir , domain logons .

              缺省設置: homedir map = <空字符串>

              示例: homedir map = amd.homedir

       host msdfs (G)
              If set to yes, Samba will act as a Dfs  server,  and  allow  Dfs-aware  clients  to
              browse Dfs trees hosted on the server.

              參見   msdfs  root share level 選項。 For more information on setting up a Dfs tree
              on Samba, refer to ???.

              缺省設置: host msdfs = no

       hostname lookups (G)
              Specifies whether samba should use (expensive)  hostname  lookups  or  use  the  ip
              addresses  instead.  An  example place where hostname lookups are currently used is
              when checking the hosts deny and hosts allow.

              缺省設置: hostname lookups = yes

              示例: hostname lookups = no

       hosts allow (S)
              與allow hosts 同義.

              這個選項是一個由逗號,空格或者tab字符隔開的一組主機名.列入其中的主機才允許訪問.

              如果該選項出現在[global]段中,它會作用於所有服務而忽略單個服務所作的不同設置.

              你可以用ip地址或主機名來指定主機.比如,你可以用類似 allow hosts = 150.203.5.  來限定
              只允許訪問在這個c類子網中的主機.hosts_access(5)中詳細描述了關於這個選項設置的完整語
              法.注意到你的系統中也許沒有這個參考手冊,這裏也作一個簡單的說明.

              注意,本機地址127.0.0.1 總是允許連接,除非在hosts deny 選項中加以禁止.

              你也可以使用子網號/子網掩碼對來指定主機.如果你的網絡支持網絡組,你還可以用網絡組名來
              指定組內的主機.EXCEPT(除了...)關鍵字可以在使用了通配符的情況下起到限定作用.

              Example 1: 允許150.203.*.* 中除了一臺機器之外的所有IP訪問

              hosts allow = 150.203. EXCEPT 150.203.6.66

              Example 2: 允許滿足給定的子網號/子網掩碼的IP訪問

              hosts allow = 150.203.15.0/255.255.255.0

              Example 3: 允許一系列主機訪問

              hosts allow = lapland, arvidsjaur

              Example 4: 允許NIS網絡組"foonet"訪問,但是禁止其中的一臺主機

              hosts allow = @foonet

              hosts deny = pirate

              注意,訪問時還是需要有適當的用戶級口令.

              參見testparm(1) 來檢測主機是否可以按照你希望的方式被訪問.

              缺省設置: none (也就是說,所有機器都可以訪問)

              示例: allow hosts = 150.203.5. myhost.mynet.edu.au

       hosts deny (S)
              hosts allow選項的反義詞.所有被列入這個選項中的主機的服務都允許被訪問,除非這個被訪
              問的服務定義了自己的允許列表.當允許的主機列表和禁止的主機列表發生衝突的時候,allow優
              先.

              缺省設置: none (沒有禁止訪問的主機)

              示例: hosts deny = 150.203.4. badhost.mynet.edu.au

       hosts equiv (G)
              如果這個選項值不是空字符串,就指定了一個文件名.這個文件中列出了可以不用口令就允許訪
              問的主機和用戶的名字.

              不要把這個選項和hosts allow  搞混了,那是關於控制主機對服務的訪問的,用於管理對來訪者
              的服務.而 hosts equiv是用於支持那些不對samba提供口令的NT客戶的.

              注意:使用hosts equiv  可能會成爲一個很大的安全漏洞.這是因爲你相信發起訪問的PC提供了
              正確的用戶名.找一臺PC來提供一個假的用戶名是很容易的.我建議你只有在完全明白你在幹什
              麼的情況下才使用hosts   equiv選項,或者在你自己的家裏(那裏有你可以完全信任的配偶和孩
              子)使用它.僅僅是在你完全可以信任他們的時候才用 :-)

              缺省設置: no host equivalences

              示例: hosts equiv = /etc/hosts.equiv

       idmap backend (G)
              The purpose of the idmap backend parameter is to allow idmap to NOT use  the  local
              idmap tdb file to obtain SID to UID / GID mappings, but instead to obtain them from
              a common LDAP backend. This way all domain members and controllers  will  have  the
              same UID and GID to SID mappings. This avoids the risk of UID / GID inconsistencies
              across UNIX / Linux systems that are sharing information over protocols other  than
              SMB/CIFS (ie: NFS).

              缺省設置: idmap backend = <空字符串>

              示例: idmap backend = ldap:ldap://ldapslave.example.com

       idmap gid (G)
              The idmap gid parameter specifies the range of group ids that are allocated for the
              purpose of mapping UNX groups to NT group SIDs. This range of group ids should have
              no existing local or NIS groups within it as strange conflicts can occur otherwise.

              The  availability  of  an idmap gid range is essential for correct operation of all
              group mapping.

              缺省設置: idmap gid = <空字符串>

              示例: idmap gid = 10000-20000

       idmap uid (G)
              The idmap uid parameter specifies the range of user ids that are allocated for  use
              in  mapping  UNIX  users to NT user SIDs. This range of ids should have no existing
              local or NIS users within it as strange conflicts can occur otherwise.

              缺省設置: idmap uid = <空字符串>

              示例: idmap uid = 10000-20000

       include (G)
              這個選項使得你可以把一個配置文件插入到另一個配置文件中去.這只是一種文本替換,就在好
              像被插入的文件的那個位置直接寫入那個插入文件一樣.

              它支持標準替換,除%u , %P%S以外.

              缺省設置: 沒有包含其他文件

              示例: include = /usr/local/samba/lib/admin_smb.conf

       inherit acls (S)
              This  parameter  can  be  used  to  ensure  that  if  default  acls exist on parent
              directories, they are always honored when  creating  a  subdirectory.  The  default
              behavior  is  to  use the mode specified when creating the directory. Enabling this
              option sets the mode to 0777, thus guaranteeing that  default  directory  acls  are
              propagated.

              缺省設置: inherit acls = no

       inherit permissions (S)
              The permissions on new files and directories are normally governed by  create mask,
              directory mask, force create mode and force directory mode but the boolean  inherit
              permissions parameter overrides this.

              New  directories  inherit  the mode of the parent directory, including bits such as
              setgid.

              New files inherit their read/write bits from the parent  directory.  Their  execute
              bits continue to be determined by map archive , map hidden and map system as usual.

              Note  that  the  setuid  bit  is  never  set  via  inheritance (the code explicitly
              prohibits this).

              This can be particularly useful on large systems with many users,  perhaps  several
              thousand, to allow a single [homes] share to be used flexibly by each user.

              參見 create mask ,  directory mask, force create mode and force directory mode .

              缺省設置: inherit permissions = no

       interfaces (G)
              這個選項允許你超越默認的Samba用來處理瀏覽,名字註冊和其他NBT網絡流量的網絡藉口列表.
              默認情況Samba向內核查詢所有活動的接口列表並且使用除了127.0.0.1 之外的接口.

              這個選項的內容是一個接口字符串的列表, 每個字符串可以是下列任何一種格式:

              一個網絡接口名(例如eth0).它可以包含象在shell風格的通配符如eth*來匹配任何以子字符
              品"eth"起始的網絡接口.

              一個IP地址.這種情況下,網絡掩碼是從內核中獲得的接口列表中檢測的.

              一個IP/掩碼對.

              一個廣播地址/掩碼對.

              "mask"選項可以是一個位長度(例如C類網絡可以是24)或者是以點分格式出現的完整網絡地址掩
              碼.

              "IP"選項可以是完整點分十六進制IP地址或是按操作系統通常使用的主機名解析機制查找的主
              機名.

              例如,下面這一行:

              interfaces = eth0 192.168.2.10/24 192.168.3.10/255.255.255.0

              將配置三個網絡接口,對應eth0設備以及IP地址192.168.2.10  和192.168.3.10。後兩個接口的
              網絡掩碼將設置爲255.255.255.0。

              參見bind interfaces only.

              缺省設置: 除了127.0.0.1 之外的所有活動接口 that are broadcast capable

       invalid users (S)
              這是一個不允許在這個服務上登錄的用戶的名單.這的確是一個非常嚴格的(paranoid)檢查,確
              保任何可能的不適當的設置都不會破壞你的系統的安全.

              以@開頭的用戶名首先被當作NIS網絡組名(如果你的系統支持NIS的話),如果在NIS的網絡組數據
              庫中找不到這個組,那麼這個名字就被當作一個UNIX用戶組名來處理.

              以+開頭的用戶名僅表示UNIX用戶組名,以&開頭的用戶名僅表示NIX網絡組名(這個設置要求你的
              系統中有NIS在運行).'+'和'&'符號可以以任何順序出現在用戶組名前,因此,你可以指定對這個
              名稱的查找次序,比如+&group表示先在UNIX用戶組中查找,再在NIS網絡組中查找,而&+group則
              相反,先在NIX網絡組中查找,再到UNIX用戶組中查找.(這與使用@前綴的效果相同).

              當前的服務名可以用%S來表示,這在[homes]段中是很有用的.

              參見 valid users .

              缺省設置: 沒有非法用戶

              示例: invalid users = root fred admin @wheel

       keepalive (G)
              這個選項是一個整數,它表示用於keepalive包間隔的秒數.如果這個選項是0,那麼就不發送保持
              連接的包.發送保持連接的包使得主機可以確定客戶端是否還在響應。

              通常,如果用於連接的socket使用了SO_KEEPALIVE屬性設置(參見socket  options),那麼發送保
              持連接的包是不需要的.基本上,除非你遇到了某些困難,這個選項是用不到的.

              缺省設置: keepalive = 300

              示例: keepalive = 600

       kernel change notify (G)
              This   parameter   specifies  whether  Samba  should  ask  the  kernel  for  change
              notifications in directories so that SMB clients can refresh whenever the  data  on
              the server changes.

              This  parameter  is  only usd when your kernel supports change notification to user
              programs, using the F_NOTIFY fcntl.

              缺省設置: Yes

       kernel oplocks (G)
              在支持基於內核的 oplocks(opportunistic lock)的UNIX系統上(目前只有IRIX  和Linux2.4內
              核),這個選項允許打開或關閉對這個特性的利用.

              內核機會性鎖定操作使得本地UNIX進程或NFS對文件進行操作時可以鎖定(凍結)smbd(8)對同一
              個文件的oplocks 操作.這可以保持SMB/CIFS,NFS和本地文件操作之間的數據一致性.(這是一個
              很cool的特性哦 :-)

              如果你的系統支持這個設置,缺省設置就是on(打開),如果系統不支持,缺省設置就是Off(關
              閉).你根本不必去管這個選項.

              參見 oplockslevel2 oplocks  參數.

              缺省設置: kernel oplocks = yes

       lanman auth (G)
              This parameter determines whether or not smbd(8) will attempt to authenticate users
              using the LANMAN password hash. If disabled, only clients which support NT password
              hashes (e.g. Windows NT/2000 clients, smbclient, etc... but not  Windows  95/98  or
              the MS DOS network client) will be able to connect to the Samba host.

              The  LANMAN  encrypted  response  is  easily  broken,  due to it's case-insensitive
              nature, and the choice of algorithm.  Servers  without  Windows  95/98  or  MS  DOS
              clients are advised to disable this option.

              Unlike  the  encypt passwords option, this parameter cannot alter client behaviour,
              and the LANMAN response will still be sent over the network. See the client  lanman
              auth to disable this for Samba's clients (such as smbclient)

              If  this  option,  and ntlm auth are both disabled, then only NTLMv2 logins will be
              permited.  Not  all  clients  support  NTLMv2,  and  most  will   require   special
              configuration to us it.

              Default : lanman auth = yes

       large readwrite (G)
              This  parameter  determines  whether  or not smbd(8) supports the new 64k streaming
              read and write varient SMB requests introduced with Windows 2000. Note that due  to
              Windows  2000  client redirector bugs this requires Samba to be running on a 64-bit
              capable operating system such as IRIX, Solaris or a Linux 2.4 kernel.  Can  improve
              performance by 10% with Windows 2000 clients. Defaults to on. Not as tested as some
              other Samba code paths.

              缺省設置: large readwrite = yes

       ldap admin dn (G)
              The ldap admin dn defines the Distinguished Name (DN) name used by Samba to contact
              the ldap server when retreiving user account information. The ldap admin dn is used
              in conjunction with the admin dn password stored in the  private/secrets.tdb  file.
              See the smbpasswd(8) man page for more information on how to accmplish this.

       ldap delete dn (G)
              This  parameter  specifies  whether  a  delete operation in the ldapsam deletes the
              complete entry or only the attributes specific to Samba.

              缺省設置: ldap delete dn = no

       ldap filter (G)
              這個選項指定了RFC2254兼容的LDAP搜索過濾器。默認對所有匹配sambaAccount對象類的條目進
              行登錄名和 uid 屬性之間的匹配。注意這個過濾器只應當返回一個條目.

              缺省設置: ldap filter = (&(uid=%u)(objectclass=sambaAccount))

       ldap group suffix (G)
              This  parameters  specifies the suffix that is used for groups when these are added
              to the LDAP directory. If this parameter is unset, the value of ldap suffix will be
              used instead.

              缺省設置: none

              示例: dc=samba,ou=Groups

       ldap idmap suffix (G)
              This  parameters  specifies the suffix that is used when storing idmap mappings. If
              this parameter is unset, the value of ldap suffix will be used instead.

              缺省設置: none

              示例: ou=Idmap,dc=samba,dc=org

       ldap machine suffix (G)
              It specifies where machines should be added to the ldap tree.

              缺省設置: none

       ldap passwd sync (G)
              This option is used to define whether or not Samba should sync  the  LDAP  password
              with  the  NT  and  LM  hashes  for normal accounts (NOT for workstation, server or
              domain trusts) on a password change via SAMBA.

              The ldap passwd sync can be set to one of three values:

              Yes = Try to update the LDAP, NT and LM passwords and update the pwdLastSet time.

              No = Update NT and LM passwords and update the pwdLastSet time.

              Only = Only update the LDAP password and let the LDAP server do the rest.

              缺省設置: ldap passwd sync = no

       ldap port (G)
              這個選項只有在編譯時配置了"--with-ldap"選項的情況下才可用.

              這個選項控制用於和LDAP服務器通訊的tcp端口號。默認應用標準的LDAP端口636。

              參見: ldap ssl

              Default : ldap port = 636 ; 如果 ldap ssl = on

              Default : ldap port = 389 ; 如果 ldap ssl = off

       ldap server (G)
              這個選項只有在編譯時配置了"--with-ldapsam"選項的情況下才可用.

              這個選項應當包含ldap目錄服務器的FQDN,用來查詢和定位用戶帳戶信息。

              Default : ldap server = localhost

       ldap ssl (G)
              This option is used to define whether or not Samba should use SSL  when  connecting
              to  the  ldap  server This is NOT related to Samba's previous SSL support which was
              enabled by specifying the --with-ssl option to the configure script.

              The ldap ssl can be set to one of three values:

              Off = Never use SSL when querying the directory.

              Start_tls = Use the LDAPv3 StartTLS extended operation (RFC2830) for  communicating
              with the directory server.

              On = Use SSL on the ldaps port when contacting the ldap server. Only available when
              the backwards-compatiblity --with-ldapsam option is  specified  to  configure.  See
              passdb backend

              Default : ldap ssl = start_tls

       ldap suffix (G)
              指定用戶和機器帳號從哪裏加入樹中。可以被ldap user suffixldap machine suffix選項越
              過。它也用作所有ldap搜索的base dn。

              缺省設置: none

       ldap user suffix (G)
              This parameter specifies where users are added to the tree. If  this  parameter  is
              not specified, the value from ldap suffix.

              缺省設置: none

       level2 oplocks (S)
              這個參數控制了是否Samba在一個共享上支持第二級(只讀)oplocks。

              2級,或者只讀oplocks允許Windows NT客戶在文件中可以保持一個oplocks,一旦第二個用戶請求
              同一文件時可以從讀寫oplocks級降爲只讀oplocks(而不是像傳統的做法,保持唯一
              的oplocks,在第二次打開時釋放所有的oplocks).這樣就可以允許支持2級oplocks的文件打開
              者緩存用於只讀的文件(也就是說,他們的寫和鎖定請求不可能被緩衝),並且使只讀文件的大量
              訪問提升性能(例如.exe文件).

              一旦在擁有隻讀oplocks的客戶中有一位對文件進行了寫操作,所有的客戶都會被通知(不需要回
              復及等待), told to break their oplocks to "none",然後刪除所有read-ahead caches.

              推薦打開這個選項,爲共享的可執行程序提高訪問速度。

              更多關於2級oplocks的討論請查看CIFS的規約.

              當前,如果使用了kernel    oplocks的話,就不會認可2級oplocks(即使把那個選項設爲yes也沒
              用).還要注意,oplocks 選項必須在共享上被設成yes纔有效果.

              參見 oplockskernel oplocks 選項。

              缺省設置: level2 oplocks = yes

       lm announce (G)
              這個選項決定nmbd(8)是否產生"Lanman宣告廣播",OS/2的客戶端需要這個廣播用以在它們的瀏
              覽列表裏看到Samba服務器.這個選項有3個值:yesnoauto.缺省值是auto.如果這值
              爲no,Samba將不會產生這種廣播.如果設置爲yes,Samba將以lm interval選項的值爲頻率產生這
              種廣播.如果設置爲auto,Samba並不發出這類廣播,但是偵聽他們.如果收到這樣的廣播,它就開
              始發送這種廣播,頻率還是以lm interval選項設定的爲準.

              參見 lm interval.

              缺省設置: lm announce = auto

              示例: lm announce = yes

       lm interval (G)
              如果Samba設置爲產生"Lanman宣告廣播(給OS/2客戶端使用,參見lm  announce選項).那麼,這
              裏的選項設定了以秒爲單位的發生頻率.如果這個選項設置爲"0",則不管lm    announce選項的
              值,永遠不會發出任何"Lanman宣告廣播".

              參見lm announce.

              缺省設置: lm interval = 60

              示例: lm interval = 120

       load printers (G)
              這個布爾值控制是否在"printcap"文件中的所有打印機將會被缺省的安裝到Samba環境,並且可
              以被瀏覽.參見"printers"段獲得更多細節.

              缺省設置: load printers = yes

       local master (G)
              這個選項允許nmbd(8)試着去成爲本地子網的主控瀏覽器.如果選項值爲no,  nmbd不會去爭取這
              個權利.在缺省情況下,這個值爲yes.設置這個值爲yes,並不意味着become 就一定會成爲本地的
              主瀏覽器,只是意味着become 會參加成爲主瀏覽器的選舉.

              設置這個值爲 no 將使 nmbd 永遠不會 成爲主控瀏覽器。

              缺省設置: local master = yes

       lock dir (G)
              與  lock directory 同義.

       lock directory (G)
              這個選項指出"加鎖文件"放置的目錄.加鎖文件用以實現最大連接數max connections.

              缺省設置: lock directory = ${prefix}/var/locks

              示例: lock directory = /var/run/samba/locks

       locking (S)
              這個選項控制當客戶端發出鎖定請求時,服務器是否執行"鎖定".

              如果 locking = no  ,所有的鎖定請求和解除鎖定請求將表現爲成功執行.對鎖定的查詢將會顯
              示沒有鎖定.

              如果locking = yes 服務器將執行真正的鎖定。

              這個選項可能對只讀文件系統有用,因爲它可能不需要鎖定(例如:CDROM).即使在這種情況
              下,我們也不真正推薦使用no.

              要特別小心,不管是全局的關閉這個選項或者在某個服務上關閉這個選項,都有可能由於缺少鎖
              定而導致數據損壞.其實,你根本就不需要設置這個選項.

              缺省設置: locking = yes

       lock spin count (G)
              This parameter controls the number of times that smbd should attempt to gain a byte
              range lock on the behalf of a client request. Experiments have shown  that  Windows
              2k  servers  do  not  reply  with  a  failure  if the lock could not be immediately
              granted, but try a few more times in case the lock could  later  be  aquired.  This
              behavior is used to support PC database formats such as MS Access and FoxPro.

              缺省設置: lock spin count = 3

       lock spin time (G)
              The  time in microseconds that smbd should pause before attempting to gain a failed
              lock. See lock spin count for more details.

              缺省設置: lock spin time = 10

       log file (G)
              這個選項允許設置其它的文件名字來替代Samba日誌文件(也就是調試文件).

              這個選項支持標準的文件名代換變量,允許方便的爲每個用戶或者機器設置專用的日誌文件.

              示例: log file = /usr/local/samba/var/log.%m

       log level (G)
              這個值(字符串)允許在smb.conf裏定義調試水平(記錄水平).This   parameter   has    been
              extended  since  the  2.2.x  series,  now  it  allow to specify the debug level for
              multiple debug classes. 這給系統配置帶來更大的靈活性.

              缺省的調試水平將在命令行裏定義,如果沒有定義,調試水平爲零.

              示例: log level = 3 passdb:5 auth:10 winbind:2

       logon drive (G)
              這個選項設置一個本地路徑(可以理解爲網絡映射盤),當登錄時,用戶的主目錄就連接到這個
              本地路徑(參見logon home).

              注意:這個選項只有在Samba是登錄服務器時纔有用.

              缺省設置: logon drive = z:

              示例: logon drive = h:

       logon home (G)
              當Win95/98或Win  NT工作站登錄到Samba PDC時,它們的主目錄的位置.設置了這個選項,就允許
              在(DOS)提示符下使用形如:

              C:\> NET USE H: /HOME

              這樣的命令。

              這個選項支持標準的命令選項替換,方便爲每個用戶或者機器提供登錄腳本.

              This parameter can be used with Win9X workstations to ensure that roaming  profiles
              are  stored  in  a  subdirectory  of the user's home directory. This is done in the
              following way:

              logon                     home                     =                     \%NUrofile

              This  tells Samba to return the above string, with substitutions made when a client
              requests the info, generally in a NetUserGetInfo request.  Win9X  clients  truncate
              the  info to \\server\share when a user does net use /home but use the whole string
              when dealing with profiles.

              Note that in prior versions of Samba, the logon path was returned rather than logon
              home. This broke net use /home but allowed profiles outside the home directory. The
              current implementation is correct, and can be used for  profiles  if  you  use  the
              above trick.

              注意,這個選項只在Samba被設置成爲登錄服務器logon server時才起作用.

              缺省設置: logon home = "\%NU"

              示例: logon home = "\remote_smb_serverU"

       logon path (G)
              這個選項指定了存放roaming  profile(WindowsNT的NTuser.dat 等文件)的用戶目錄.Contrary
              to previous versions of these manual pages, it  has  nothing  to  do  with  Win  9X
              roaming profiles. To find out how to handle roaming profiles for Win 9X system, see
              the logon home parameter.

              這個選項支持標準替換,允許你爲每一個用戶或機器設置不同的登錄腳本.它也可以指定那些顯
              示在Windows NT客戶端上的"應用程序數據"(桌面,開始菜單,網上鄰居程序等文件夾和他們的
              內容).

              指定的共享資源和路徑必須是用戶可讀的,這樣,設定的選項和目錄才能被Windows  NT客戶端裝
              載使用.這個共享資源在用戶第一次登錄時必須是可寫的,這樣Windows        NT客戶端才能建
              立NTuser.dat文件及其他目錄.

              然後,這些目錄以及其中的任何內容都可以根據需要設置爲只讀的.把NTuser.dat文件設置成只
              讀是不明智的,你應該把它改名成NTuser.man(一個強制使用(MANdatory)的user.dat)來達到同
              樣的目的.

              Windows終端有時候即使沒有用戶登錄也會保持對[homes]共享資源的連接.因此,logon  path不
              能包含對homes共享資源的任何參照(也就是說,把這個選項設置成類
              似\\%N\HOMES\profile_path會引起問題).

              這個選項支持標準替換,允許你爲不同的機器或用戶設置不同的登錄腳本.

              注意,這個選項只有在Samba被設置成爲登錄服務器logon server的時候才起作用.

              缺省設置: logon path = \\%N\%U\profile

              示例: logon path = \\PROFILESERVER\PROFILE\%U

       logon script (G)
              這個選項指明,當一個用戶成功的登錄後,將會自動下載到本地執行的腳本文件,這個腳本文件可
              能是一個批處理文件(.bat)或者一個NT命令文件(.cmd).這個腳本文件必須使用DOS風格的
              回車/換行(CR/LF)來結束每一行,因此,我們推薦使用DOS風格的文本編輯器來建立這個文件.

              腳本文件的存放位置必須是相對於[netlogon]服務中指明的目錄路徑,舉例來說,如
              果[netlogon]服務指定了了一個path/usr/local/samba/netlogon,而logon    script     =
              STARTUP.BAT, 那麼將要下載到客戶端執行的文件的實際存放位置是:

              /usr/local/samba/netlogon/STARTUP.BAT

              登錄腳本的內容包含什麼,完全由你決定.我們建議包含這個指令:NET  TIME   \SERVER   /SET
              /YES,它強迫每一臺機器的時間和服務器的時間同步(以服務器的時間爲準);另一個建議是映
              射公共工具盤:NET USE U:\\SERVER\"公共工具目錄" 例如:

              NET USE Q:\SERVERISO9001_QA

              注意:在一個有安全要求的系統環境中,特別重要的是要記住不要允許客戶在[netlogon]上有寫
              的權限,也不要給以客戶改寫登錄腳本文件的權利.如果允許客戶隨意的修改,安全規則就給撕裂
              了一個口子.

              這個選項支持標準的置換規則,允許你爲每個不同的用戶或機器定製不同的登錄腳本.

              注意,這個選項只有在Samba設置爲登錄服務器時才起作用.

              缺省設置: no logon script defined

              示例: logon script = scriptsU.bat

       lppause command (S)
              這個選項指定在服務器上中斷指定的打印作業的打印或假脫機打印操作所使用的指令.

              這個指令應該是一個可以根據打印機名和作業號中斷打印作業的程序或腳本.實現這個操作的一
              個辦法是使用作業優先級,優先級別太低的作業不會被髮送到打印機上.

              用%p置換可以取得打印機名,而%j會被打印作業號(一個整數)置換.在HPUX系統中(參
              見printing=hpux  ),如果給lpq命令加上-p%p選項,打印作業會顯示其執行狀態,具體的說,如果
              作業的優先級低於阻塞級別,它會顯示'PAUSED'狀態,反之,如果作業的優先級等於或高於阻塞級
              別,它會顯示'SPOOLED'或'PRINTING'狀態.

              注意,在這個設置中使用絕對路徑是一個好習慣,因爲這個路徑有可能不在服務器的PATH環境變
              量中.

              參見 printing  parameter選項.

              缺省設置:  目前這個選項沒有缺省設置,除非printing選項設置SYSV,在這種情況下,缺省參 數
              是:

              lp -i %p-%j -H hold

              或者在printing選項設置爲softq時,缺省選項是:

              qstat -s -j%j -h

              在HPUX系統中的例子: lppause command = /usr/bin/lpalt %p-%j -p0

       lpq cache time (G)
              此選項控制了lpq信息多長時間被緩衝一次,以防止頻繁調用lpq命令.每一次系統使用lpq命令會
              保留一個單獨的緩衝,所以如果不同的用戶分別使用了不同的lpq命令的話,他們不可能共享緩衝
              信息.

              緩衝文件被存放在/tmp/lpq.xxxx文件中,其中的xxxx是正在使用的lpq命令哈希表.

              這個選項的缺省值是10秒,這就是說以前相同的lpq命令的緩衝內容將在週期爲10秒內被使用.如
              果lpq命令非常慢的話,可以取稍大的值.

              把這個值設爲0就完全禁止了緩衝技術的使用.

              參見 printing 選項.

              缺省設置: lpq cache time = 10

              示例: lpq cache time = 30

       lpq command (S)
              這個選項指定爲了獲得lpq風格的打印機狀態信息而要在服務器上要執行的命令.

              這個命令應該是一個只以打印機名作爲選項並可以輸出打印機狀態信息的程序或腳本.

              通常支持九種打印機狀態信息:CUPS,  BSD,AIX,LPRNG,PLP,SYSV,HPUX,QNX和SOFTQ.而這些正好
              覆蓋了大多數的UNIX系統.你可以用printing =選項來控制到底要用哪種類型.

              有些客戶端(特別是Windows for  Workgroups)可能不能正確地向打印機發送聯接號以獲得狀態
              信息.對此,服務器會向客戶報告它所聯接的首個打印服務.這樣的情況只當聯接號發送非法時纔
              會發生.

              如果使用%p變量的話,系統會在此處放置打印機名.否則在命令後放置打印機名.

              注意,當服務器不能獲得PATH變量的話,以絕對路徑來描述lpq command是個好習慣. 當與CUPS庫
              編譯連接時,不需要lpq command,因爲smbd將使用庫調用來獲得打印隊列列表。

              參見 printing  選項.

              缺省設置: 依賴於  printing 的設置情況

              示例: lpq command = /usr/bin/lpq -P%p

       lpresume command (S)
              此選項指定爲了繼續連續打印或假脫機一個指定的打印任務時要在服務器上執行的命令.

              此命令應該是一個以打印機名和要恢復的打印任務號作爲選項的程序或腳本.參見lppause
              command 參數。

              如果使用%p變量的話,系統會在此處放置打印機名.用%j來代替打印任務號,當然是用整數形  式
              羅.

              注意,當服務器不能獲得PATH變量的話,以絕對路徑來描述lpresume command是個好習慣

              參見 printing  選項.

              缺省設置: 當前沒有缺省設置,除非 printing 選項是 SYSV, 此時默認是

              lp -i %p-%j -H resume

              或者如果printing 選項是 SOFTQ, 那麼默認是:

              qstat -s -j%j -r

              HPUX的示例: lpresume command = /usr/bin/lpalt %p-%j -p2

       lprm command (S)
              此選項指定爲了要刪除一個打印任務而需要在服務器上執行的命令.

              此命令應該是一個使用打印機名和打印任務號的程序或腳本,並且執行它們可以刪掉打印任務.

              如果使用%p變量的話,系統會在此處放置打印機名.用%j來代替打印任務號,當然是也用整數形式
              羅.

              注意,當不能從服務器獲得PATH變量的話,以絕對路徑來描述lprm command是個好習慣.

              參見printing  選項.

              缺省設置: 依賴於 printing  選項設置

              示例 1: lprm command = /usr/bin/lprm -P%p %j

              示例 2: lprm command = /usr/bin/cancel %p-%j

       machine password timeout (G)
              如果samba服務器是Windows NT域成員的話(參見security=domain選項),那麼運行中的smbd進程
              會週期性地試着改變儲存在叫做private/secrets.tdb的TDB中的MACHINE ACCOUNT PASSWORD.這
              個參數指定了密碼將多久更換一次,以秒爲單位。缺省值是一個星期(當然要以秒來表示),這
              與NT域成員服務器是一樣的.

              參見 smbpasswd(8), 和 security = domain 選項.

              缺省設置: machine password timeout = 604800

       magic output (S)
              此選項指定了一個用magic腳本輸出內容而建立的文件的名稱,參見下面對magic  script選項的
              描述.

              警告:如果兩個客戶在同樣的目錄下用相同的magic script,輸出文件內容是無法確定的.

              缺省設置: magic output = <magic script name>.out

              示例: magic output = myfile.txt

       magic script (S)
              這個選項用來指定將被服務器執行的文件的名字,這個文件如果已經打開,那麼,當這個文件關閉
              後服務器同樣也可以運行.這樣就允許了一個UNIX腳本可以傳送到samba主機,併爲所連接的用戶
              運行.

              以這種方式運行的腳本將會在完成以後被刪除,只要權限允許的話.

              如果腳本產生了輸出的話,這些信息就被送到magic  output選項指定的文件中(見以上描述).

              注意,一些命令解釋器不能解釋包含CR/LF而不是CR回車換行符的腳本.magic腳本必須是可以被
              運行的(就象在本地主機運行一樣),而有些腳本在某些主機上或某些shell下可能會在dos客戶
              端進行過濾處理.

              magic腳本仍處於實驗階段,所以不能對此完全依賴.

              缺省設置: 無。禁止使用magic script.

              示例: magic script = user.csh

       mangle case (S)
              參見NAME MANGLING部分.

              缺省設置: mangle case = no

       mangled map (S)
              這個選項是用來直接映射那些不能在Windows/DOS上描述的unix文件名.不過並不經常出現這樣
              的情況,只有一些特殊的擴展名在DOS和UNIX之間纔會不同,例如,HTML文件在UNIX下通常都
              是.html,而在Windows/DOS下通常卻是.htm.

              所以如果要將 html 映射爲 htm 你應當這樣:

              mangled map = (*.html *.htm)

              有一個非常有用的經驗是刪掉在CDROM光盤上一些文件名後面討人厭的;1(只有在一些UNIX可以
              看到它們).爲此可以這樣映射:(*;1 *;).

              缺省設置: 沒有 mangled map

              示例: mangled map = (*;1 *;)

       mangled names (S)
              這個選項控制是否要把UNIX下的非DOS文件名映射爲DOS兼容的形式("mangled")並使得它們可以
              查閱,或者簡單地忽略掉這些非DOS文件名.

              NAME MANGLING部分有更多關於如何控制這類處理的詳細信息.

              如果使用了這種映射,那麼其算法就象下面這樣:

              把文件名最後一個點符號前面首五個字母數字字符強制轉換成大寫,作爲要映射名字的首五個字
              符.

              在要映射名字的起始部分加上"~"符號,後面跟兩個字符的特殊序列字串,而這個序列字串是由原
              始的文件名而來(也就是:原文件名去掉最後的文件擴展名).只有當文件的擴展名含有大寫字
              母或長於三個字符時,文件的最後擴展名才被包含在散列計算中.

              注意,如果你不喜歡'~'的話,可以用mangling char選項來指定你想要的字符.

              最後,擴展名部分的前三個字符會被保留,強制轉換到大寫並作爲映射後名字的擴展名.最後的擴
              展名就是原始文件名中最後一個'.'右面的那部分.如果文件名中沒有'.',那麼映射後的文件名
              也沒有擴展名部分(除非用了"hidden files" - 參見後面的介紹).

              unix的文件名如果以點開始,那麼好比DOS中的隱藏文件.這些文件映射後的文件名就會拿掉點符
              號並用"___"來作爲它的擴展名,而不管原來的擴展名是什麼("___"是三個下劃線).

              大寫字母數字字符組成了兩位散列值.

              如果目錄中的文件與要映射的文件名使用了相同的前五位字符,這樣的算法會導致名稱衝突,不
              過發生衝突的可能性是1/1300.

              名稱映射允許當需要保留unix長文件名時在unix目錄與Windows/DOS之間拷貝文
              件.從Windows/DOS中拷過來的unix文件可以更換新的擴展名並保留同樣的主文件名.名稱映射並
              不會在轉換時更改什麼東西.

              缺省設置: mangled names = yes

       mangled stack (G)
              這個選項控制了映射文件名的數量,以便讓Samba服務器smbd(8)對其進行緩存.

              棧裏保存了最近映射的基本文件名(擴展名只有在超過3個字符或者包含大寫字符時纔會保留).

              棧值設得稍大一些,對於映射unix的長文件名操作會更順利一些.但是,它會使目錄訪問變得更
              慢;小一些的棧可以保存在服務器的內存中(每個棧元素佔256個字節).

              並不保證在轉換長文件名時絕對正確無誤,準備好面對可能出現的驚奇.

              缺省設置: mangled stack = 50

              示例: mangled stack = 100

       mangle prefix (G)
              controls the  number  of  prefix  characters  from  the  original  name  used  when
              generating  the mangled names. A larger value will give a weaker hash and therefore
              more name collisions. The minimum value is 1 and the maximum value is 6.

              mangle prefix is effective only when mangling method is hash2.

              缺省設置: mangle prefix = 1

              示例: mangle prefix = 4

       mangling char (S)
              這個選項指定在name mangling操作中使用什麼樣的字符作爲magic字符.缺省是用了'~',不過有
              些軟件可能會在使用上受到某些妨礙.可以設定爲你想要的字符.

              缺省設置: mangling char = ~

              示例: mangling char = ^

       mangling method (G)
              controls  the  algorithm  used  for  the generating the mangled names. Can take two
              different values, "hash" and "hash2". "hash" is the default and  is  the  algorithm
              that  has  been  used  in Samba for many years. "hash2" is a newer and considered a
              better algorithm (generates less collisions) in  the  names.  However,  many  Win32
              applications  store the mangled names and so changing to the new algorithm must not
              be done lightly as these applications may break unless reinstalled.

              缺省設置: mangling method = hash2

              示例: mangling method = hash

       map acl inherit (S)
              This boolean parameter controls whether smbd(8) will attempt to map  the  'inherit'
              and  'protected' access control entry flags stored in Windows ACLs into an extended
              attribute called user.SAMBA_PAI. This parameter only takes effect if Samba is being
              run  on  a  platform  that supports extended attributes (Linux and IRIX so far) and
              allows the Windows 2000 ACL editor to correctly  use  inheritance  with  the  Samba
              POSIX ACL mapping code.

              缺省設置: map acl inherit = no

       map archive (S)
              這個選項決定了是否把DOS的歸檔屬性映射爲UNIX可執行位.在文件修改後DOS的歸檔位會被設定
              到文件上.保持歸檔位的一個理由是使得Samba或者你的PC在新建任何文件的時候,不會爲它們
              設置UNIX可執行屬性。那樣對於共享源代碼、文檔等等非常讓人厭煩。

              注意這個選項需要在create   mask[u4E2D]沒有排除文件屬主的執行權限位(也就是說它必須包
              含100).參見create mask選項中的描述.

              缺省設置: map archive = yes

       map hidden (S)
              這個選項決定DOS下的隱藏文件是否要映射爲UNIX全局可執行位.

              注意這個選項需要在create        mask中沒有排除所有用戶的執行權限位(也就是說它必須包
              含001).參見create mask選項中的描述.

              缺省設置: map hidden = no

       map system (S)
              這個選項決定DOS下的系統文件是否要映射爲UNIX組可執行位.

              注意這個選項需要在create mask中沒有排除組用戶的執行權限位(也就是說它必須包含010).參
              見create mask選項中的描述.

              缺省設置: map system = no

       map to guest (G)
              這個選項只在安全模式不是共享級(security=share)時纔有用,也就是選用了用戶安全級,服務
              器安全級或者域安全級(user, server, 和domain).

              這時,選項會有三種不同的值,分別通知smbd(8)在用戶以非法身份登錄時作何相應處理.

              這三種設定是:

              Never - 意思是用戶登錄時用了個非法口令並且被服務器所拒.這是個缺省值.

              Bad User - 意思是用戶登錄時用了非法口令並且被服務器所拒,除非用戶名不存在,否則也可以
              以來賓身份登錄並映射到對應的guest account賬號.

              Bad Password -  意思是用戶登錄時即使用了非法口令,但是還會以來賓身份登錄並映射到對應
              的guest賬號.可能出現這樣的問題,就是用戶雖然輸錯了口令,卻非常平靜地以“來賓”身份登錄
              到系統上。他們不明白爲什麼他們不能訪問那些他們認爲可以訪問的資源,因爲在登錄時沒有任
              何信息提示他們輸錯了口令。所以應該小心使用它,以避免不必要的麻煩.  Helpdesk services
              will hate you if you set the map to guest parameter this way :-).

              注意當使用共享級以外的其它安全模式時,要設定這個選項,以使"Guest"共享資源服務發揮作
              用.因爲在這些安全級模式中,用戶請求的共享資源名在服務器成功驗證用戶登錄前不會發送到
              服務器作處理,所以服務器就在不能處理聯接驗證結果時爲聯接提供"Guest"共享.

              對於那些以前的版本,這個選項會映射到編譯時所用的local.h文件裏定義的GUEST_SESSSETUP變
              量的值.

              缺省設置: map to guest = Never

              示例: map to guest = Bad User

       max connections (S)
              最大聯接數就是允許同時聯接到一個資源服務的最大數量限制.在max connections大於0的情況
              下,如果聯接數超過了最大聯接數設定時,超出的聯接將被拒絕.如果設爲0的話就沒有這樣的聯
              接限制了.

              爲了實現這樣的功能,系統會使用記錄鎖定文件.鎖定文件存放在lock  directory選項指定的目
              錄中.

              缺省設置: max connections = 0

              示例: max connections = 10

       max disk size (G)
              控制磁盤使用的上限.如果把它設爲100的話,所有的共享資源容量都不會超過100M.

              注意這個選項並不是限制管理員往磁盤上存放數據的容量.在上面所說的情況中,管理員仍然可
              以存放超過100M的數據到磁盤上,但如果客戶查詢剩餘磁盤空間或磁盤總空間的話,所得到的結
              果就只在這個 max disk size指定的容量範圍之內.

              使用這個選項主要是爲了對一些瘋狂使用磁盤空間的軟件進行一定的限制,特別是它們可能會使
              用超過1G上以的磁盤空間.

              把這個選項設爲0說明沒有限制.

              缺省設置: max disk size = 0

              示例: max disk size = 1000

       max log size (G)
              這個選項(一個kB爲單位的整數)用來指定使用的記錄文件最大到多少容量.samba會週期性地檢
              查這個容量,如果超過這個選項值就把老的文件換名成擴展名爲.old的文件.

              把這個選項設爲0說明沒有限制.

              缺省設置: max log size = 5000

              示例: max log size = 1000

       max mux (G)
              這個選項控制了對用戶允許的最大SMB併發操作數.你應該不需要設定這個選項的.

              缺省設置: max mux = 50

       max open files (G)
              這個選項限定了在任意時間客戶端用一個 smbd(8)文件服務進程可以打開的最大文件數.缺省的
              值非常高(10,000),因爲對於每個未打開的文件只使用其中的一位.

              打開文件極限通常用UNIX每進程最大文件描述符數來限制更好,所以你不需要去碰這個選項的.

              缺省設置: max open files = 10000

       max print jobs (S)
              This parameter limits the maximum number of jobs allowable in a Samba printer queue
              at any given moment. If this number is exceeded, smbd(8) will remote "Out of Space"
              to the client. See all total print jobs.

              缺省設置: max print jobs = 1000

              示例: max print jobs = 5000

       max protocol (G)
              此項的值是一個字符串,定義了服務器支持的最高協議等級.

              可能的值是:

              CORE: 早期版本,不接受用戶名.

              COREPLUS: 在CORE的基礎上改進了一些性能.

              LANMAN1: 第一個比較流行的協議,支持長文件名.

              LANMAN2: 對LANMAN1進行了更新.

              NT1: 目前用於Windows NT,一般稱爲CIFS.

              通常,此選項不必設定,因爲在SMB協議中會自動協商並選擇合適的協議.

              參見 min protocol

              缺省設置: max protocol = NT1

              示例: max protocol = LANMAN1

       max reported print jobs (S)
              This  parameter  limits  the maximum number of jobs displayed in a port monitor for
              Samba printer queue at any given moment. If this number  is  exceeded,  the  excess
              jobs  will  not  be shown. A value of zero means there is no limit on the number of
              print jobs reported. See all total print jobs and max print jobs parameters.

              缺省設置: max reported print jobs = 0

              示例: max reported print jobs = 1000

       max smbd processes (G)
              This parameter limits the maximum number of smbd(8) processes concurrently  running
              on a system and is intended as a stopgap to prevent degrading service to clients in
              the event that the server has insufficient  resources  to  handle  more  than  this
              number  of  connections. Remember that under normal operating conditions, each user
              will have an smbd(8) associated with him or her to handle connections to all shares
              from a given host.

              缺省設置: max smbd processes = 0 ## no limit

              示例: max smbd processes = 1000

       max ttl (G)
              這個選項通知nmbd(8)  當它用廣播或從WINS服務器請求一個名字時,這個NetBIOS名字的有效時
              間('time to live', 以秒計)是多長.你不需要去碰這個選項,缺省值是3天.

              缺省設置: max ttl = 259200

       max wins ttl (G)
              這個選項通知smbd(8)程序當它作爲一個WINS服務器時(wins  support   =true),nmbd承認的最
              長NetBIOS名字生存時間('time     to    live',以秒計).你不需要去改變這個選項的,缺省值
              是6天(518400秒).

              參見 min wins ttl 選項.

              缺省設置: max wins ttl = 518400

       max xmit (G)
              這個選項控制通過samba的最大包容量.缺省值是65535,同時這也是最大值.有時你可能用一個較
              小的值可以得到更好的性能.不過低於2048通常會有一些問題.

              缺省設置: max xmit = 65535

              示例: max xmit = 8192

       message command (G)
              當服務器接收到一個WinPopup類似的信息時運行一個指定的命令.

              通常這個命令所做之事都取決於你的想象.

              例如:

              message command = csh -c 'xedit %s;rm %s' &

              這個命令用xedit發出一條信息,然後再刪除它.注意很重要的一點是這個命令應該立即返回.這
              就是爲什麼在行末用'&'的原因.如果它沒有立即返回的話,計算機可能會在發送信息時當掉
              的(不過一般都會在30秒後恢復).

              所有信息都被以全局訪客用戶身份發送.命令可以使用標準的替換符,不過%u將不會有效(在這裏
              用%U可能更好).

              除了標準替換的部分,還可以應用一些附加的替換,比如:

              %s =包含消息的文件名

              %t = 發送信息的目標(很可能是服務器名).

              %f = 信息的來源.

              你可以用這個命令來發送郵件或者你想要的內容.如果你有關於發送內容的好主意請通知開發人
              員.

              有個例子可以以郵件形式發送信息給root:

              message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s

              如果沒有指定發送信息所用的命令,那麼這個信息並不會被髮出,同時Samba向發送者報告出
              錯.不幸的是WfWg(Windows for Workgrups)完全忽略出錯代碼,提示信息已被髮出.

              如果你想要悄悄地刪掉它的話請用:

              message command = rm %s

              缺省設置: 沒有 message command

              示例: message command = csh -c 'xedit %s; rm %s' &

       min passwd length (G)
              與 min password length 同義.

       min password length (G)
              此項設定當執行變更UNIX口令時smbd接受的明文口令的最小字符長度.

              參見 unix password sync, passwd programpasswd chat debug 選項.

              缺省設置: min password length = 5

       min print space (S)
              此項設定一個用戶假脫機打印作業必須的最小剩餘磁盤空間.當然是用kB 爲單位.缺省設爲0,就
              是說用戶總是可以假脫機打印作業.

              參見 printing  選項。

              缺省設置: min print space = 0

              示例: min print space = 2000

       min protocol (G)
              The value of the parameter (a string) is the lowest SMB protocol dialect than Samba
              will support. Please refer to the max  protocol  parameter  for  a  list  of  valid
              protocol names and a brief description of each. You may also wish to refer to the C
              source code in source/smbd/negprot.c for  a  listing  of  known  protocol  dialects
              supported by clients.

              If  you  are viewing this parameter as a security measure, you should also refer to
              the lanman auth 選項。 Otherwise, you should never need to change this 選項。

              Default : min protocol = CORE

              Example : min protocol = NT1 # disable DOS clients

       min wins ttl (G)
              此項通知nmbd(8)當以WINS服務器的形式(wins support = yes)執行時,它所承認的NetBIOS名字
              的最小有效時間(以秒爲單位).這個選項無需更改,缺省是6小時(21600秒)

              缺省設置: min wins ttl = 21600

       msdfs proxy (S)
              This  parameter indicates that the share is a stand-in for another CIFS share whose
              location is specified by the value of the 選項。 When clients attempt to connect to
              this share, they are redirected to the proxied share using the SMB-Dfs protocol.

              Only  Dfs  roots  can  act  as proxy shares. Take a look at the msdfs root and host
              msdfs options to find out how to set up a Dfs root share.

              示例: msdfs proxy = \\otherserver\someshare

       msdfs root (S)
              If set to yes, Samba treats the share as a Dfs root and allows  clients  to  browse
              the  distributed  file  system  tree  rooted  at the share directory. Dfs links are
              specified   in   the   share   directory   by   symbolic   links   of   the    form
              msdfs:serverA\\shareA,serverB\\shareB and so on. For more information on setting up
              a Dfs tree on Samba, refer to ???.

              參見 host msdfs

              缺省設置: msdfs root = no

       name cache timeout (G)
              Specifies the number of seconds it takes before entries in samba's hostname resolve
              cache time out. If the timeout is set to 0. the caching is disabled.

              缺省設置: name cache timeout = 660

              示例: name cache timeout = 0

       name resolve order (G)
              samba套件中的一些程序使用此項來決定使用的名字服務以及解析主機名到IP地址的次序.主要
              目的是控制netbios名稱怎樣解析。此選項列出不同的名字解析選項,以空格爲分隔符.

              這些名字解析選項是:"lmhosts","host","wins"和"bcast".它們決定了名字解析是以如下方式
              的:

              lmhosts  : 在samba的lmhosts文件中查找IP地址.如果lmhosts文件的內容行中沒有名字類型附
              加在NetBIOS名上時(參見lmhosts (5)中的詳細描述),任何類型的名字都可以匹配這個查詢.

              host   :    執行標準的主機名到IP地址的解析操作,此操作會使用系統的/etc/hosts,NIS或者
              是DNS來查詢.具體方法取決於操作系統,在IRIX和Solaris中解析名字的方法可能是
              由/etc/nsswitch.conf文件來控制的.注意此方法只適用於對被查詢的NetBIOS名字類型
              爲0x20(服務器)或者是0x1c(域控制器)時纔有用,其它類型都會被忽略.後一種情況只在活動目
              錄域中有用,返回一個匹配_ldap._tcp.domain 的SRV RR條目的DNS 查詢。

              wins : 向列在wins server選項中的服務器查詢一個名字對應的IP地址.如果沒有指定WINS服務
              器,那麼此方法就被略過了.

              bcast : 向在interfaces選項中列出的每一個已知本地網絡接口進行廣播來作查詢.這是最不可
              信的名字解析方法,除非目標主機就在本地子網中.

              缺省設置: name resolve order = lmhosts host wins bcast

              示例: name resolve order = lmhosts bcast host

              在上例中首先檢查本地lmhosts文件,然後嘗試廣播,接下來就是用通常的系統主機名查詢方式
              了.

              When  Samba  is  functioning in ADS security mode (security = ads) it is advised to
              use following settings for name resolve order:

              name resolve order = wins bcast

              DC lookups will still be done via DNS, but fallbacks  to  netbios  names  will  not
              inundate your DNS servers with needless querys for DOMAIN<0x1c> lookups.

       netbios aliases (G)
              此項指定一串NetBIOS名字讓nmbd作爲附加的名字進行宣佈.這樣就使一個機器在可瀏覽列表中
              可以出現多個名字形式.如果主機是瀏覽服務器或登錄服務器,  就不會出現這些附加的別名,而
              只會使用它的初始名字.

              參見 netbios name 選項。

              缺省設置: 空字符串 (沒有附加的名字)

              示例: netbios aliases = TEST TEST1 TEST2

       netbios name (G)
              此項對一已知的samba服務器設置它的NetBIOS名.缺省情況下會使用此主機DNS名字的主機名部
              分.如果這個服務器是作瀏覽服務器或登錄服務器時(或是主機DNS名的第一個成分時),這個服務
              器名將成爲這些服務對外宣佈時所用的名字.

              參見 netbios aliases 選項

              缺省設置: machine DNS name

              示例: netbios name = MYNAME

       netbios scope (G)
              This  sets  the NetBIOS scope that Samba will operate under. This should not be set
              unless every machine on your LAN also sets this value.

       nis homedir (G)
              此項從NIS映射表中取得有效共享服務器.對於用自動裝載程序的UNIX系統來說,用戶的主目錄經
              常根據需要從遠程服務器裝載到一個需要的工作站上.

              如果samba登錄服務器不是作爲真正主目錄服務器而是通過NFS來實現,卻通知用戶以SMB服務器
              來使用主目錄時,用戶裝載主目錄來進行訪問需要兩個網絡跳步(一個以SMB方式,另一個以NFS方
              式裝載).這樣的使用方式是非常慢的.

              此選項允許當Samba在主目錄服務器方式運行時讓samba反饋目錄服務器而非登錄服務器上的主
              共享資源,這樣samba用戶可以直接從目錄服務器上裝載目錄.當samba把目錄共享資源反饋給用
              戶,這時它會參考homedir map選項指定的NIS映射表然後再反饋表中列出的服務.

              注意要使此項起作用必須有一個運作中的NIS系統,並且samba服務器必須是一個登錄服務器。

              缺省設置: nis homedir = no

       nt acl support (S)
              此布爾量選項控制是否讓smbd(8)嘗試把UNIX權限映射到NT的訪問控制列表.這個參數在2.2.2之
              前是一個全局選項。

              缺省設置: nt acl support = yes

       ntlm auth (G)
              This parameter determines whether or not smbd(8) will attempt to authenticate users
              using the NTLM encrypted password response. If disabled, either the lanman password
              hash or an NTLMv2 response will need to be sent by the client.

              If this option, and lanman auth are both disabled, then only NTLMv2 logins will  be
              permited.   Not   all  clients  support  NTLMv2,  and  most  will  require  special
              configuration to us it.

              Default : ntlm auth = yes

       nt pipe support (G)
              此布爾量選項控制是否讓smbd(8)允許Windows NT用戶聯接到NT的特殊SMB管道IPC$.這通常是開
              發者所用的調試項,其它用戶可以不管.

              缺省設置: nt pipe support = yes

       nt status support (G)
              This  boolean  parameter controls whether smbd(8) will negotiate NT specific status
              support with Windows NT/2k/XP clients. This is a  developer  debugging  option  and
              should  be  left  alone.  If this option is set to no then Samba offers exactly the
              same DOS error codes that versions prior to Samba 2.2.3 reported.

              You should not need to ever disable this 選項。

              缺省設置: nt status support = yes

       null passwords (G)
              Allow or disallow client access to accounts that have null passwords.  允許或禁止用
              戶以空口令使用賬號.

              參見smbpasswd(5).

              缺省設置: null passwords = no

       obey pam restrictions (G)
              When  Samba  3.0  is  configured  to  enable  PAM  support  (i.e. --with-pam), this
              parameter will control whether or not Samba should obey PAM's account  and  session
              management  directives.  The  default  behavior  is  to  use  PAM  for  clear  text
              authentication only and to ignore any account  or  session  management.  Note  that
              Samba always ignores PAM for authentication in the case of encrypt passwords = yes.
              The reason is that PAM modules cannot support the challenge/response authentication
              mechanism needed in the presence of SMB password encryption.

              缺省設置: obey pam restrictions = no

       only guest (S)
              與  guest only同義.

       only user (S)
              此布爾量選項控制是否允許當前進行聯接所用的用戶名沒有列在user列表中.缺省情況下此項是
              被禁止了,這樣用戶只要提供服務需要的用戶名就可以了.設置這個選項將強制服務器使
              用user列表中的登錄用戶名,這隻在共享級安全中有效。

              要注意的是上面的說法也表明了samba並不會從服務名而推演出相應的用戶名.這樣的話對
              於[homes]段就比較麻煩了.要避免麻煩的話需要用user =  %S,這句就表明你的用戶列表user正
              好就是這個服務資源名,這時的主目錄名就是用戶名.

              參見 user 選項。

              缺省設置: only user = no

       oplock break wait time (G)
              此項調整性的選項以適應在Windows        9x和WinNT中可能出現的錯誤.當用戶發起一個會導
              致oplock暫停請求(oplock break  request)的SMB對話時,如果samba對其響應太快的話,客戶端
              將會失敗並且不能響應此請求.這個可調整的選項(以毫秒爲單位)是一個samba在向這樣的客戶
              發送oplock暫停請求前等待的時間量.

              除非你理解了samba的oplock代碼,否則不要改變這個選項!

              缺省設置: oplock break wait time = 0

       oplock contention limit (S)
              這是個非常高級的smbd(8)調整選項,用以改進在多個用戶爭奪相同文件時oplocks認可操作的效
              率.

              簡單地說,這個選項指定了一個數字,如果爭奪相同文件的用戶數量超過了此設定極限的話,即
              使有請求,smbd(8)也不再認可oplock的操作了.這樣的話smbd就象Windows NT一樣的運行.

              除非你理解了samba的oplock代碼,否則不要改變這個選項!

              缺省設置: oplock contention limit = 2

       oplocks (S)
              此布爾量通知smbd是否對當前請求的共享資源上的文件打開操作啓用oplocks(機會性的鎖定操
              作).oplock代碼可以明顯改善訪問samba服務器文件的速度(approx.30% 甚至更多).它允許本地
              緩存文件,對於不可信賴的網絡環境來說可能需要禁止掉這個選項(在Windows  NT服務器上它是
              缺省打開的).請參考samba docs/目錄下的Speed.txt文件.

              oplocks會有選擇性地關閉每一個基本共享資源上的特定文件.參見  veto  oplock  files  選
              項.在有些系統上會通過最底層的操作系統確認oplocks.這樣就可以在所有的訪問與oplocked文
              件中進行數據同步,而不管此訪問是通過samba或NFS或者是本地的UNIX進程.參見kernel
              oplocks選項查看細節.

              參見 kernel oplocks 以及  level2 oplocks parameters.

              缺省設置: oplocks = yes

       os2 driver map (G)
              The parameter is used to define the absolute path to a file containing a mapping of
              Windows NT printer driver names to OS/2 printer driver names. The format is:

              <nt driver name> = <os2 driver name>.<device name>

              For  example,  a valid entry using the HP LaserJet 5 printer driver would appear as
              HP LaserJet 5L = LASERJET.HP LaserJet 5L.

              The need for the file is due to the printer driver namespace problem  described  in
              ???. For more details on OS/2 clients, please refer to ???.

              缺省設置: os2 driver map = <空字符串>

       os level (G)
              這個整數值控制在瀏覽器選舉中Samba宣佈它本身是什麼系統級別. 此選項的值決定了nmbd(8是
              否有機會成爲本地廣播區域內工作組 WORKGROUP中的主控瀏覽器.

              注意:   默認情況下,Samba將在本地主控瀏覽器選舉中超越所有M$操作系統並且獲勝,除非還
              有Windows    NT4.0/2000   域控制器。這意味着Samba主機的錯誤配置將使一個子網的瀏覽無
              效。參見Samba docs/ 目錄中的BROWSING.txt 來獲取詳細信息。

              缺省設置: os level = 20

              示例: os level = 65

       pam password change (G)
              With the addition of better PAM  support  in  Samba  2.2,  this  parameter,  it  is
              possible  to use PAM's password change control flag for Samba. If enabled, then PAM
              will be used for password changes when requested by an SMB client  instead  of  the
              program  listed  in  passwd  program.  It should be possible to enable this without
              changing your passwd chat parameter for most setups.

              缺省設置: pam password change = no

       panic action (G)
              此項是一個samba開發者使用的選項以允許當smbd(8)或smbd(8)程序崩潰時可以調用一個系統命
              令.通常這種功能被用於發出對問題的警告.

              缺省設置: panic action = <空字符串>

              示例: panic action = "/bin/sleep 90000"

       paranoid server security (G)
              Some  version of NT 4.x allow non-guest users with a bad passowrd. When this option
              is enabled, samba will not use a broken NT  4.x  server  as  password  server,  but
              instead complain to the logs and exit.

              Disabling  this  option  prevents  Samba  from  making  this  check, which involves
              deliberatly attempting a bad logon to the remote server.

              缺省設置: paranoid server security = yes

       passdb backend (G)
              This option allows the administrator to chose which backends to retrieve and  store
              passwords  with.  This  allows  (for  example) both smbpasswd and tdbsam to be used
              without a recompile. Multiple backends can be specified, separated by  spaces.  The
              backends  will  be  searched  in the order they are specified. New users are always
              added to the first backend specified.

              This parameter is in two parts, the backend's name, and a  'location'  string  that
              has meaning only to that particular backed. These are separated by a : character.

              Available  backends can include: .TP 3 • smbpasswd - The default smbpasswd backend.
              Takes a path to the smbpasswd file as an optional argument. .TP • tdbsam - The  TDB
              based  password  storage  backend.  Takes a path to the TDB as an optional argument
              (defaults to passdb.tdb in the private dir directory. .TP  •  ldapsam  -  The  LDAP
              based  passdb  backend.  Takes  an  LDAP  URL  as an optional argument (defaults to
              ldap://localhost) LDAP connections should be secured where possible.  This  may  be
              done  using  either  Start-TLS  (see ldap ssl) or by specifying ldaps:// in the URL
              argument. .TP • nisplussam - The NIS+ based passdb backend. Takes name  NIS  domain
              as  an optional argument. Only works with sun NIS+ servers. .TP • mysql - The MySQL
              based passdb backend. Takes  an  identifier  as  argument.  Read  the  Samba  HOWTO
              Collection for configuration details. .LP

              缺省設置: passdb backend = smbpasswd

              示例:       passdb       backend       =       tdbsam:/etc/samba/private/passdb.tdb
              smbpasswd:/etc/samba/smbpasswd

              示例: passdb backend = ldapsam:ldaps://ldap.example.com

              示例: passdb backend = mysql:my_plugin_args tdbsam

       passwd chat (G)
              這個字串控制在smbd(8)和本地口令更改程序間更用戶口令時發生的"chat"對話.字符串描述一
              個應答接收對的序列,讓smbd(8)用於決定對passwd program發送並等待接收哪些具體的內容.如
              果沒有收到預計的輸出時不會更改口令.

              這個chat序列一般發生在特定的主機上,取決於本地口令控制的方法(就象NIS或者別的).

              注意這個選項僅僅在unix   password    sync選項設置爲yes的時候有用。當smbpasswd文件中
              的SMB口令被更改時是以root身份運行的,不必輸入舊密碼文本. 這意味着root必須可以在不知
              道用戶密碼時重置他的密碼。在NIS/YP 中這意味着passwd程序必須在NIS主控服務器上運行。

              這個字符串可以包含%n宏,用於替換新密碼。chat序列還可以包含標準宏\\n, \\r, \\t\\s
              來給出換行,回車,tab和空格。chat序列字符串還可以包含'*' 來匹配任何字符序列。雙引號
              用來將帶空格的字符串設爲一個單獨的字符串。

              如果在對話序列的任何部分發送的字符串爲一個句號".",那麼不會發送任何內容.同樣,如果等
              待接收部分有字符串是一個".",那麼不等待任何的內容.

              如果pam  password change參數設置爲yes,chat可以以任何順序進行,沒有特定的輸出,是否
              成功可以由PAM結果得到。在PAM會話中宏\n被忽略。

              參見 unix password sync,  passwd program  ,  passwd  chat  debugpam  password
              change.

              缺省設置: passwd chat = *new*password* %n\n *new*password* %n\n *changed*

              示例:  passwd  chat  =  "*Enter  OLD  password*"  %o\n  "*Enter NEW password*" %n\n
              "*Reenter NEW password*" %n\n "*Password changed*"

       passwd chat debug (G)
              此布爾量指定口令對話腳本選項是否以  debug模式運行.在調試模式下,發送和接收的口令對話
              字符串會打印到debug level爲100時的smbd(8)記錄文件中.由於在smbd 記錄中允許使用明文口
              令,所以這是個危險的選項.不過這個選項可以幫助Samba管理員在調用passwd program設好的口
              令程序時調試其passwd  chat  對話腳本,並且應該在完成以後把它關閉.這個選項在設置了pam
              password change選項時無效。缺省情況下這個選項是關閉的.

              參見 passwd chat , pam password change , passwd program .

              缺省設置: passwd chat debug = no

       passwd program (G)
              指定用於設定UNIX用戶口令的程序名.出現%u的地方表示以用戶名替換.在調用口令更改程序前
              會先檢查用戶名是否存在.

              需要注意的是很多口令程序強調口令要合法,例如應該有最小長度或者是字母與數字的混合.這
              可能在一些客戶端(如WfWg)總將口令轉爲大寫發送時,引起一些問題.

              注意如果把unix   password    sync選項設爲yes的話,在改變smbpasswd文件中的SMB口令時是
              以root身份調用改口令程序的.如果口令更改失敗的話,smbd對SMB口令的更改也會失敗,這是設
              計時的機制.

              如果設定了unix password  sync選項的話,指定口令程序時必須使用所有程序的絕對路徑,必須
              檢查安全問題.缺省的unix password sync選項值是 no.

              參見 unix password sync.

              缺省設置: passwd program = /bin/passwd

              示例: passwd program = /sbin/npasswd %u

       password level (G)
              在一些客戶端/服務器羣體中使用大小寫混合口令存在着困難.其中比較麻煩的一類客戶
              是WfWg,因爲它在使用LANMAN1協議時出於某些理由而強調要使用大寫口令.不過當使
              用COREPLUS時不要修改它!   另外在Windows95/98  操作系統中會出問題:  即使選擇了會話中
              的NTLM0.12協議,這些客戶端也會將明文口令轉爲大寫。

              此選項定義了口令字中大寫字母的最大數量.

              例如,假定給出的口令是"FRED".如果 password level設爲1的話,在"FRED"驗證失敗時會嘗試以
              下的口令組合:

              "Fred", "fred", "fRed", "frEd","freD"

              如果password level設爲2的話,就會嘗試下面的組合:

              "FRed", "FrEd", "FreD", "fREd", "fReD", "frED", ..

              等等。

              把此選項設成的值越高,相對單一大小寫口令來說大小寫混合的口令越容易匹配。.不過,要小
              心使用這個選項會降低安全性,同時增加處理新聯接所花的時間量.

              如果把選項設爲0時會使處理口令時只作兩種嘗試 - 先與給出的口令比較,再比較它的全部小寫
              形式.

              缺省設置: password level = 0

              示例: password level = 4

       password server (G)
              通過在這裏指定其它的SMB服務器或者活動目錄域控制器,同時使用security                =
              [ads|domain|server],能把聯接samba的用戶名/口令合法性驗證交給指定的遠程服務器去幹.

              此選項設定上面所說的其它口令服務器的名字或者IP地址. 新的語法允許在連接到ADS realm服
              務器時指定端口號。要指定默認的LDAP    389端口之外的號碼,可以將端口號放在名字或ip後
              面,中間用一個冒號連接(比如說,192.168.1.100:389)。如果你不指定一個端口,Samba將使
              用標準的LDAP端口tcp/389. 注意端口號在WindowsNT4.0 域或者netbios連接的服務器上無效

              如果參數是一個名稱,它將使用 name resolve order 中指定的方式來解析。

              口令服務器應該是使用"LM1.2X002"或"LM  NT 0.12"協議的主機,而且它本身必須使用用戶級安
              全模式.

              注意:使用口令服務器表明你的UNIX主機(就是運行Samba的那臺)就只與你指定的口令服務器具
              有相同的安全等級了.在沒有完全信任的情況下不要選擇使用其它的口令服務器.

              不要把口令服務指向Samba服務器本身,這產生一個循環而去查找你的Samba服務器,導致死鎖.

              在指定口令服務器名時可以使用標準的替換符,而實際能用的可能只是%m這一個,這個替換符說
              明Samba服務器會用聯入的客戶作爲口令服務器.如果這樣用的話說明你非常信任你的客戶,同時
              最好以主機允許策略對他們進行限制!

              如果把安全級security選項設爲domain或者ads的話,指定的其它口令服務器必須是在這
              個Domain中的一個主域控制器或備份域控制器或者'*'.另外指定字符'*'的話就以samba服務器
              會在整個域中使用加密驗證RPC調用來驗證用戶登錄.使用 security = domain的好處是,如果指
              定了幾個password server時,smbd  會對每一個進行嘗試直到它收到迴應,對於初始服務器當機
              時這就很有用了.

              如果password server選項設爲字符'*'的話,samba將嘗試通過查詢WORKGROUP<1C>名字來自動查
              找主或者備份域控制器並聯系經過名字解析得到的IP地址列表中的每個服務器來進行用戶驗證.

              如果服務器列表包含名字或IP同時也包含'*'時,列表將視爲首選域控制器的列表,但是也會添
              加一個自動的對所有其餘DC的查找。Samba不會通過定位最近的DC來優化這張列表。

              如果securityserver的話,會有一些安全級爲security = domain時所沒有的限制:

              如果在password    server選項中指定了幾個口令服務器的話,smbd在聯接具體的服務器時會失
              敗,也不能驗證任何的用戶賬號.這是安全級爲security = server  模式時SMB/CIFS協議的一個
              限制,並且Samba無法修改.

              如果把Windows NT服務器作爲口令服務器,你必須確保用戶可以從Samba服務器上進行登錄.當使
              用 security = server模式時,網絡登錄看起來是從那裏處理的,而不是從用戶工作站.

              參見 security  選項。

              缺省設置: password server = <空字符串>

              示例: password server = NT-PDC, NT-BDC1, NT-BDC2, *

              示例: password server = windc.mydomain.com:389 192.168.1.101 *

              示例: password server = *

       path (S)
              此項指定給出的服務項所用的系統路徑.在服務項具有可打印屬性時,打印假脫機數據會先存放
              在這個路徑所指的位置中.   This parameter specifies a directory to which the user of
              the service is to be given access. In the case of printable services, this is where
              print data will spool prior to being submitted to the host for printing.

              對於那些要對訪客提供的可打印服務來說,服務項應該設爲只讀,而且路徑應該設爲全局可寫屬
              性並具有粘性(s)位.這當然不是強制性的,不過不這樣做的話可能會無法得到你所希望的結果.

              路徑出現%u的地方將以正處於聯接狀態的UNIX用戶名來替換;同樣出現%m的地方將以請求聯接
              的主機NetBIOS名替換.在設定僞主目錄時,這種替換項很有用的.

              所指定的路徑都是基於根目錄root dir(如果有的話)的.

              缺省設置: 

              示例: path = /home/fred

       pid directory (G)
              This option specifies the directory where pid files will be placed.

              缺省設置: pid directory = ${prefix}/var/locks

              示例: pid directory = /var/run/

       posix locking (S)
              The smbd(8) daemon maintains an database of file locks obtained by SMB clients. The
              default behavior is to map this internal database to POSIX locks. This  means  that
              file  locks  obtained  by  SMB  clients  are  consistent  with  those seen by POSIX
              compliant applications accessing the files via a non-SMB method (e.g. NFS or  local
              file access). You should never need to disable this 選項。

              缺省設置: posix locking = yes

       postexec (S)
              此項指定在斷開服務時運行的一個命令.它使用通常的替換項.此命令在一些系統中可能是
              以root身份來運行的.

              一個有趣的示例,用於卸載服務器資源:

              postexec = /etc/umount /cdrom

              參見 preexec.

              缺省設置:  (不執行命令)

              示例: postexec = echo

       preexec (S)
              此項指定在聯接到服務時運行一個命令.通常這也可以用一些替換項.

              一個有趣的示例,在用戶每一次登錄時向對方發送一個歡迎信息:(一條格言?)

              preexec = csh -c 'echo

              當然,一段時間以後這類信息可能就比較討厭了:-)

              參見 preexec closepostexec .

              缺省設置:  (不執行命令)

              示例: preexec = echo

       preexec close (S)
              此布爾量選項控制是否從preexec 返回的非零代碼會關閉所聯接的服務.

              缺省設置: preexec close = no

       prefered master (G)
              這是爲拼寫錯誤準備的。請查看  preferred master :-)

       preferred master (G)
              此布爾量選項控制nmbd(8)是否作爲工作組裏的首選主瀏覽器.

              如果設此選項爲yes時,nmbd會在啓動時強制進行一次選舉,它有一些有利條件來贏得選舉.推薦
              把此選項與 domain master = yes聯合使用,這樣nmbd可以保證成爲一個域瀏覽器.

              小心使用此項,因爲如果在相同的子網內有多個主機(不管是Samba服務器,Windows95還是NT)參
              加選舉的話,他們每個都會週期性不斷地嘗試成爲本地主瀏覽器,這時會造成不必須的廣播交通
              流量並降低瀏覽性能.

              參見 os level.

              缺省設置: preferred master = auto

       preload (G)
              此選項定義了要自動加入到瀏覽列表的服務項清單.這對於homes和printers服務項非常有用,否
              則這些服務將是不可見的.

              注意,如果你想加載printcap裏所有的打印機,那麼用load printers會更容易.

              缺省設置: no preloaded services

              示例: preload = fred lp colorlp

       preload modules (G)
              This is a list of paths to modules that should be loaded into smbd before a  client
              connects.  This  improves  the  speed  of  smbd  when  reacting  to new connections
              somewhat.

              缺省設置: preload modules =

              示例: preload modules = /usr/lib/samba/passdb/mysql.so+++

       preserve case (S)
              此項控制建立新的文件時取名是否使用用戶傳遞的大小寫,還是強制使用default case .

              缺省設置: preserve case = yes

              參見NAME MANGLING段中的完整討論.

       printable (S)
              如果此項設爲yes,那麼用戶可以讀寫併發送打印緩存文件到服務項指定的目錄中.

              注意一個可打印的服務總是允許通過緩存打印數據的方法向服務項路徑中執行寫操作(需要用戶
              有可寫權限).read only選項控制只允許不可打印地訪問資源.

              缺省設置: printable = no

       printcap (G)
              與  printcap name 同義.

       printcap name (S)
              此項用於覆蓋掉編譯時產生的缺省printcap名(通常是/etc/printcap).參見[printers]段的討
              論,它說明了爲什麼要這樣做的理由.

              To use the CUPS printing interface set printcap  name  =  cups  .  This  should  be
              supplemented  by  an  addtional  setting  printing  = cups in the [global] section.
              printcap name = cups will use the "dummy" printcap created by CUPS, as specified in
              your CUPS configuration file.

              在可以用lpstat命令列出可用打印機的列表的System V系統上,可以用printcap name = lpstat
              來自動獲得可用打印機列表.這對於配置samba時定義成SYSV的系統(這就包括了很多基於System
              V的系統)來說是缺省情況.如果在這些系統上設好printcap    namelpstat的話,samba就會執
              行lpstat -v並嘗試分析輸出信息以獲得一份打印機列表.

              通常最小的printcap文件看起來就象下面這樣:

              print1|My Printer 1
              print2|My Printer 2
              print3|My Printer 3
              print4|My Printer 4
              print5|My Printer 5

              我們看到'|'符號用來定義打印機的別名.第二個帶有空格的別名其實是提示Samba它是註釋.

              在AIX中默認的printcap文件名是/etc/qconfig. 如果在文件名中找到qconfig字樣,Samba將假
              定文件是AIX 的qconfig格式。

              缺省設置: printcap name = /etc/printcap

              示例: printcap name = /etc/myprintcap

       print command (S)
              當一個打印作業完全緩衝到了服務項時,此項指定的命令就能過調用system()來處理那些緩存文
              件.通常我們指定典型的命令來發送緩存文件到主機的打印子系統,不過也不一定要這樣.服務器
              不會刪除那些緩存文件,所以你指定的任何命令都應當在處理完以後刪除文件,否則的話就需要
              手工來刪除舊的緩存文件了.

              打印命令是一個簡單的文本字符串。它可以在宏替換之後逐字傳遞給系統。

              %s, %f - 緩衝文件名路徑

              %p - 適當的打印機名

              %J - 客戶提交的作業名

              %c - 緩衝的作業需要打印的頁數

              %z -緩衝的打印作業的大小(以字節計)

              打印命令至少必須包含%s%f替換符中的一個,而%p是個可選項.在提交打印作業時,如果不提供
              打印機名的話,%p替換符會從打印命令中刪掉.

              如果在[global]段中指定了打印命令,它將被用於任何可打印性的服務項,而不再需要在它們之
              中單獨指定了.

              如果既沒有對可打印性服務項單獨指定打印命令又沒有指定一個全局的打印命令時,假脫機文件
              雖然會建立卻不會被處理也不會被刪除(這很重要哦).

              注意在某些UNIX上以nobody賬號身份進行打印會導致失敗.如果發生了這樣的情況請建立一個單
              獨的有打印權的訪客賬號並在[global]段裏設置guest account選項.

              如果你明白命令是直接傳遞給shell的話,你可以組織非常複雜的打印命令.舉例來說,下面的命
              令會記錄一個打印作業,打印這個文件然後刪掉它.注意這裏的';'是shell腳本命令常用的分隔
              符.

              print command = echo Printing %s >> /tmp/print.log; lpr -P %p %s; rm %s

              你可能必須根據平時在系統上打印文件的方式來改變這個命令.缺省情況下,此選項會根
              據printing選項的設定而變化.

              缺省設置: 對於 printing = BSD, AIX, QNX, LPRNG 或者 PLP :

              print command = lpr -r -P%p %s

              對於 printing = SYSV 或者 HPUX :

              print command = lp -c -d%p %s; rm %s

              對於 printing = SOFTQ :

              print command = lp -d%p -s %s; rm %s

              對於 printing = CUPS :

              如果Samba  編譯時加入了libcups, 那麼printcap=cups將使用CUPS API來提交作業等等。否則
              它用-oraw選項,使用SystemV命令來打印,也就是說它會用lp   -c   -d%p   -o   raw;   rm
              %s.當printing  = cups, 並且Samba編譯時加入了libcups時,任何手工設置的打印命令將被忽
              略。

              示例: print command = /usr/local/samba/bin/myprintscript %p %s

       printer (S)
              與  printer name 同義。

       printer admin (S)
              This is a  list  of  users  that  can  do  anything  to  printers  via  the  remote
              administration  interfaces offered by MS-RPC (usually using a NT workstation). Note
              that the root user always has admin rights.

              缺省設置: printer admin = <空字符串>

              示例: printer admin = admin, @staff

       printer name (S)
              此選項指定可打印性服務項用來打印緩存作業數據的打印機.

              如果在[global]段裏指定了打印機名稱,那麼給出的打印機就用於任何可打印性服務項而不需個
              別的指定打印機名稱了.

              缺省設置:  (在很多系統中可能是 lp )

              示例: printer name = laserwriter

       printing (S)
              此選項控制系統上如何解釋打印機狀態信息,而如果在[global]段中定義,它也會影響print
              command,lpq command,lppause command,lpresume commandlprm command這些選項的缺省值

              通常系統支持九種打印機風格,它們是BSD, AIX, LPRNG, PLP, SYSV, HPUX, QNX,  SOFTQ,還有
              CUPS

              要在系統上查看使用了不同的選項後其它打印命令的缺省值,可以用testparm(1)程序.

              此項可以在每一臺打印機上分別設置.

              參見[printers]段的討論。

       print ok (S)
              與 printable 同義。

       private dir (G)
              This  parameters  defines  the  directory  smbd  will use for storing such files as
              smbpasswd and secrets.tdb.

              Default :private dir = ${prefix}/private

       profile acls (S)
              This boolean parameter controls whether smbd(8) This boolean parameter was added to
              fix  the  problems that people have been having with storing user profiles on Samba
              shares from Windows 2000 or Windows XP clients. New versions  of  Windows  2000  or
              Windows XP service packs do security ACL checking on the owner and ability to write
              of the profile directory stored on a local workstation when  copied  from  a  Samba
              share.

              When  not in domain mode with winbindd then the security info copied onto the local
              workstation has no meaning to the logged in user (SID) on that workstation  so  the
              profile  storing fails. Adding this parameter onto a share used for profile storage
              changes two things about the returned Windows ACL. Firstly it changes the owner and
              group  owner  of  all reported files and directories to be BUILTIN\\Administrators,
              BUILTIN\\Users respectively (SIDs S-1-5-32-544, S-1-5-32-545). Secondly it adds  an
              ACE  entry  of "Full Control" to the SID BUILTIN\\Users to every returned ACL. This
              will allow any Windows 2000 or XP workstation user to access the profile.

              Note that if you have multiple users logging on to a workstation then in  order  to
              prevent  them  from  being  able to access each others profiles you must remove the
              "Bypass traverse checking" advanced user right. This will prevent access  to  other
              users profile directories as the top level profile directory (named after the user)
              is created by the workstation profile code and has an ACL restricting entry to  the
              directory tree to the owning user.

              缺省設置: profile acls = no

       protocol (G)
              與 max protocol 同義

       public (S)
              與 guest ok 同義

       queuepause command (S)
              定義服務器暫停打印隊列時要執行的命令.

              此命令應該是個只用打印機名作爲選項的程序或腳本,以便用來停止打印隊列,使打印作業不再
              向打印機發送.

              此命令不支持Windows for Workgroups,但可以在Windows 95和NT的打印機窗口中發送.

              此處用替換符%p可以替代打印機名稱.否則這個名稱將被放置在命令後面.

              注意,在命令中使用絕對路徑是個好習慣,因爲不一定可以獲得服務器的PATH變量.

              缺省設置: 依賴於 printing 選項的設置

              示例: queuepause command = disable %p

       queueresume command (S)
              定義服務器恢復暫停了的打印隊列時要執行的命令.就是用於恢復因爲上面的選項( queuepause
              command)而導致的結果的.

              此命令應該是個只用打印機名作爲選項的程序或腳本,以便用來恢復打印隊列,使打印作業繼續
              向打印機發送.

              此命令不支持Windows for Workgroups,但可以在Windows 95和NT的打印機窗口中發送.

              此處用替換符%p可以替代打印機名稱.否則這個名稱將被放置在命令後面.

              注意,在命令中使用絕對路徑是個好習慣,因爲不一定可以獲得服務器的PATH變量.

              缺省設置: 依賴於 printing 選項的設置

              示例: queuepause command = enable %p

       read bmpx (G)
              此布爾量選項控制是否讓smbd(8)支持"多工讀塊"(Read Block Multiplex)的SMB.現在這種方式
              已經很少用了,所以缺省是no.一般你不需要設定此選項.

              缺省設置: read bmpx = no

       read list (S)
              此處給出對服務項有隻讀權限的用戶清單.如果正在聯接的用戶屬於此列表,那麼他們將沒有寫
              權限,此時是不管read only選項是否設置的.此列表可以包括用在 invalid users  選項中描述
              的語法定義的組名稱.

              參見  write listinvalid users 選項。

              缺省設置: read list = <空字符串>

              示例: read list = mary, @students

       read only (S)
              注意它與 writeable 反義.

              如果這個參數是yes, 那麼服務的用戶不能建立或修改服務目錄中的文件。

              注意一個可打印的服務(printable  = yes) 的目錄 總是 可寫的(需要用戶可寫權限)但是隻能
              通過緩衝操作來寫.

              缺省設置: read only = yes

       read raw (G)
              此選項控制着是否讓服務器在傳送數據到客戶端時支持讀取原始的SMB請求.

              如果允許,那麼它會以65535 字節爲單位來讀取一個數據包的65535字節.這會帶來較多的性能方
              面的好處.

              但是,有些客戶端使用不正確的包容量(雖然是可允許的),或者它們不支持大容量包,所以對這些
              客戶端你應該禁止這一選項.

              通常將此選項作爲一種系統調試工具,而且嚴格來說不應修改.參見write raw選項.

              缺省設置: read raw = yes

       read size (G)
              此項影響着磁盤讀/寫與網絡讀/寫的輪流交替.如果在若干個SMB命令(通常
              是SMBwrite,SMBwriteX和SMBreadbraw)中傳送的數據量超過此項設定的值時,服務器開始就會在
              從網絡接收整個數據包之前進行寫操作;在執行SMBreadbraw的情況下,服務器在從磁盤上讀出
              所有數據之前就開始向網絡中寫數據.

              在磁盤與網絡的訪問速度相近時,這種交迭式的工作就會做得非常好,不過當其中一類設備的速
              度大大高於另一類時,它只會有那麼一點點效果.

              缺省的值是16384,但沒有做過測試最優值的實驗。根據已經瞭解的情況來看,在使用不同的系統
              時,最優化值的差別很大.一個大於65536的值是沒有任何意義的,它只會造成不必要的內存分配.

              缺省設置: read size = 16384

              示例: read size = 8192

       realm (G)
              This  option  specifies  the  kerberos  realm  to use. The realm is used as the ADS
              equivalent of the NT4 domain. It is usually set to the DNS  name  of  the  kerberos
              server.

              缺省設置: realm =

              示例: realm = mysambabox.mycompany.com

       remote announce (G)
              此項允許你設置nmbd(8)週期性地向任意工作組的任意IP地址申明自己的存在.

              如果你要samba服務器處在一個通常瀏覽傳播規則沒有正常工作的遠程工作組裏時,用此項就很
              有用了.此遠程工作組可以位於IP包到得到的任何地方.

              例如:

              remote announce = 192.168.2.255/SERVERS 192.168.4.255/STAFF

              以上這行說明nmbd 對兩個給出的使用工作組名的IP地址進行申明.如果你只用了IP地址的話,那
              麼會用workgroup選項裏給出的工作組名來替代.

              你選用的IP地址通常應該是遠程網絡的廣播地址,不過也可以用配置穩定的網絡中的已知主瀏覽
              器IP地址.

              缺省設置: remote announce = <空字符串>

       remote browse sync (G)
              此項允許你設定nmbd(8)週期性地同步位於遠程(remote  segment)的Samba主瀏覽器上的瀏覽列
              表.同時也允許你收集位於具有交叉路由子網中主瀏覽器上的瀏覽列表.這是以一種和其他
              非Samba的服務器不兼容的方式進行的。

              This is useful if you want your Samba server and all local clients to appear  in  a
              remote  workgroup  for  which  the  normal browse propagation rules don't work. The
              remote workgroup can be anywhere that you can send IP packets to.

              例如:

              remote browse sync = 192.168.2.255 192.168.4.255

              以上行會使nmbd向位於指定子網或地址中的主瀏覽器請求同步他們本地服務器中的瀏覽列表

              你選用的IP地址通常應該是遠程網絡的廣播地址,不過也可以用配置非常穩定的網絡中的已知主
              瀏覽器IP地址.如果給出一個主機的IP地址,或者主控瀏覽器事實上在自己的網段中, samba就
              驗證遠程主機是否有效、是否正在偵聽了。

              缺省設置: remote browse sync = <空字符串>

       restrict anonymous (G)
              這個選項限制了是否在匿名連接中返回用戶和組列表信息,仿照了Windows2000  和NT在註冊表
              鍵值HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\LSA\RestrictAnonymous  中的
              做法。設置爲0的時候,任何請求都返回用戶和組列表。設置爲1的時候,只有認證的用戶可以
              獲得用戶和組列表。設置爲2的時候,只有Windows2000/XP和Samba支持,不允許匿名連接。這
              樣做會阻止需要匿名操作的M$或第三方程序運行。

              The security advantage of using restrict anonymous = 1  is  dubious,  as  user  and
              group list information can be obtained using other means.

              The  security advantage of using restrict anonymous = 2 is removed by setting guest
              ok = yes on any share.

              缺省設置: restrict anonymous = 0

       root (G)
              與 root directory" 同義

       root dir (G)
              與 root directory" 同義.

       root directory (G)
              服務器將在啓動時對此項所設之目錄進行chroot()(也就是改變根目錄)  操作.對於安全操作來
              說,這並不是十分必要的.如果沒有這步操作,服務器會拒絕對服務項以外的文件進行訪問.同時
              也檢查並拒絕那些文件系統其它部分的軟鏈接或者嘗試在其它目錄(取決於選項wide links的設
              置情況)中使用".."這些操作.

              加入一個root    directory,注意不是實際的"/"目錄,可以增加額外的安全級別,但是代價就高
              了.這樣完全確保了所指定的root  directory及所屬子目錄外的文件都是不能訪問的,包括服務
              器正常運行時所需的一些文件也是如此.因此要想維護服務器整體的可操作性,你需要鏡像一些
              系統文件到所指定的root directory下.特別是要鏡像  /etc/passwd文件或此文件的子集,如果
              需要的話,任何打印操作要用到的二進制文件或配置文件也要鏡像.當然,應該由操作系統決定必
              須被鏡像的文件集合.

              缺省設置: root directory = /

              示例: root directory = /homes/smb

       root postexec (S)
              此項與 postexec選項含義相同,只是以root身份來運行命令而已.在一次聯接關閉之後對文件系
              統,特別是光盤驅動器進行卸載是非常有用的.

              參見  postexec.

              缺省設置: root postexec = <空字符串>

       root preexec (S)
              此項與  preexec選項含義相同,只是以root身份來運行命令而已.在一次聯接穩定建立之後裝載
              文件系統,特別是光盤驅動器是非常有用的.

              參見  preexecpreexec close 選項.

              缺省設置: root preexec = <空字符串>

       root preexec close (S)
              此項與preexec close 選項含義相同,只是以root身份來運行命令而已.

              參見  preexecpreexec close.

              缺省設置: root preexec close = no

       security (G)
              此項是smb.conf文件中最重要的一個設定之一,它影響了客戶是如何應答Samba服務器的.

              這個選項設置了“安全模式位”用於答覆協議協商以使smbd(8) 調整共享安全級是開或者關.客戶
              端根據此位決定是否(以及如何)向服務器傳送用戶和口令信息.

              缺省值是security = user,這也是在Windows 98和Windows NT環境中最常用的設定.

              可選的值 security = share, security = server 或者security = domain .

               2.0.0版本之前的Samba中,缺省值是 security = share 主要因爲當時只有這一個值可選。

              在WfWg裏有一個錯誤,當在使用用戶和服務器安全級時,WfWg客戶將會完全忽略你在"connect
              drive"對話框裏鍵入的口令.這就使除了在WfWg裏已登錄的用戶以外的任何人要聯接Samba服務
              項變得非常困難.

              如果你的主機使用與UNIX主機上相同的用戶名時,就應當使用security = user.如果你用的用戶
              名通常在UNIX上不存在時就應該用security = share.

              如果你想設置共享而不用口令的話(訪客級共享)也應該用security=share.這通常用於提供共享
              打印的服務器.在security=user裏設定guest帳戶非常困難,詳細的情況請參見map  to guest選
              項.

              smbd可能會使用一種混雜模式(hybrid),這樣就可以在不同的NetBIOS  aliases下提供用戶和共
              享級的安全特性.

              現在解釋各個不同的設定.

              SECURITY = SHARE

              當客戶聯接到一個共享安全級的服務器,在聯接共享資源之前無需用一個合法的用戶名和口令登
              錄到服務器(雖然現在的客戶端象WIN95/95及NT在與security = share  的服務器交談時都會以
              用戶名發送一個登錄請求,但卻沒有帶口令).相反,客戶端會在每一個共享上發送認證信息(口
              令)以嘗試聯接到這個共享項.

              注意 smbd 總是 用合法的UNIX用戶代表客戶進行操作, 即使是在 security = share 的時候.

              因爲在共享安全級中,客戶無需向服務器發送用戶名,所以smbd用一些技術來爲客戶決定正確
              的UNIX用戶賬號.

              用於匹配給出客戶口令的可能的UNIX用戶名列表可以用以下方法建立:

              如果設置了guest only選項,則跳過所有其它步驟只檢查guest account用戶名.

              如果通過共享連接請求發送一個用戶名,則此用戶名(映射後  - 參見username map)被作爲潛在
              用戶名加入.

              如果客戶使用一個先前的 logon  請求(SessionSetup SMB調用)則在SMB中發送的用戶名將作爲
              潛在用戶名加入.

              客戶請求的服務項名被作爲潛在用戶名加入.

              客戶的NetBIOS名被作爲潛在用戶名加入到列表中.

              在user列表中的任何用戶都被作爲潛在用戶名加入.

              如果未設guest  only選項,則使用提供的口令來嘗試此列表.對於匹配到口令的第一個用戶將作
              爲UNIX用戶身份使用.

              如果設置了guest          only選項或未檢測到用戶名,則如果共享項中標誌爲可以使用guest
              account,那麼使用此訪客用戶賬號,否則拒絕訪問.

              注意,在共享安全級中關於哪個UNIX用戶名最後將在允許訪問中使用非常混淆.

              參見NOTE ABOUT USERNAME/PASSWORD VALIDATION段.

              SECURITY  = USER 這是samba2.0/3.0缺省安全級設置.對於用戶安全級,一個客戶必須先以合法
              的用戶名和口令(也可以用username map選項進程映射)“登錄”.在此安全模式中也可使用加密口
              令(參見encrypted passwords選項).如果設置瞭如userguest only這樣的選項,則它們會被應
              用並且在此連接上更改UNIX用戶賬號,但只能在用戶賬號被成功驗證之後才行.

              注意,當服務器成功驗證客戶身份之前,請求的資源名稱是發送到服務器上的.這就是爲什麼用
              戶安全級中在沒有允許服務器自動把未知用戶映射爲guest  account的情況下,訪客共享無法工
              作.參見map to guest選項獲得完成映射的細節.

              參見NOTE ABOUT USERNAME/PASSWORD VALIDATION段.

              SECURITY = DOMAIN

              只有已經用   net(8)把服務器添加進一個Windows   NT的域中,此安全模式才能正常工作.它要
              求encrypted         passwords選項設爲yes.在此模式中Samba將試圖把用戶名/口令傳送到一
              個WindowsNT主域或備份域控制器進行驗證像一臺真正的WindowsNT服務器那樣。

              注意,仍然需要存在一個和域控制器上的用戶名一致的有效的UNIX用戶,來使Samba擁有一個有
              效的UNIX帳戶來映射存取文件操作。

              注意,對於客戶端來說,security=domain模式與security=user是一樣的.它隻影響  服務器處理
              驗證工作的方式.對於客戶端無任何影響.

              注意,當服務器成功驗證客戶身份之前,請求的資源名稱是不發送到服務器上的.這就是爲什麼域
              安全級中在沒有允許服務器自動把未知用戶映射爲guest    account的情況下,訪客共享無法工
              作.參見map to guest選項獲得完成映射的細節

              參見 NOTE ABOUT USERNAME/PASSWORD VALIDATION 段.

              參見 password server parameter 和 encrypted passwords 選項。

              SECURITY = SERVER

              在此模式中Samba將試圖把用戶名/口令傳送到其它SMB服務器,比如一臺NT服務器,進行驗證.如
              果驗證失敗則回到security = user模式,它需要encrypted passwords 參數設置爲yes,除非遠
              端系統不支持它們。但是要注意,如果使用了加密口令的話,samba不會再去檢查UNIX系統口令
              文件的,它必須有一個合法的smbpasswd文件以再次檢查用戶賬號.參見Samba HOWTO Collection
              中關於User Database 的章節來獲得如何設置的信息。

              This mode of operation has significant pitfalls, due to the fact  that  is  activly
              initiates  a man-in-the-middle attack on the remote SMB server. In particular, this
              mode of operation can cause significant resource consuption on the PDC, as it  must
              maintain  an active connection for the duration of the user's session. Furthermore,
              if this connection is  lost,  there  is  no  way  to  reestablish  it,  and  futher
              authenticaions  to  the  Samba  server  may  fail.  (From  a single client, till it
              disconnects).

              注意,對於客戶端來說,security=server模式與security=user是一樣的.它隻影響服務器處理驗
              證工作的方式.對於客戶端無任何影響.

              注意,當服務器成功驗證客戶身份之前,請求的資源名稱是發送到服務器上的.這就是爲什麼服
              務器安全級中在沒有允許服務器自動把未知用戶映射爲guest  account的情況下,訪客共享無法
              工作.參見 map to guest選項獲得完成映射的細節.

              參見 NOTE ABOUT USERNAME/PASSWORD VALIDATION 段.

              參見 password server parameter 和 encrypted passwords 選項。

              SECURITY = ADS

              In this mode, Samba will act as a domain member in an ADS realm. To operate in this
              mode, the machine running Samba will need to have Kerberos installed and configured
              and Samba will need to be joined to the ADS realm using the net utility.

              Note  that  this  mode  does  NOT  make  Samba operate as a Active Directory Domain
              Controller.

              Read the chapter about Domain Membership in the HOWTO for details.

              參見 ads server  parameter, the realm  paramter 和encrypted passwords 選項。

              缺省設置: security = USER

              示例: security = DOMAIN

       security mask (S)
              此選項控制NT客戶用本地NT安全對話框操作UNIX權限時對權限所作的修改情況.          This
              parameter  controls  what  UNIX  permission  bits can be modified when a Windows NT
              client is manipulating the UNIX permission on a file using the native  NT  security
              dialog box.

              此選項用掩碼值'與'實現對權限位的更改,從而防止修改未出現在此掩碼中的任何位.可以將掩
              碼中的0看作用戶無權更改的位值.  This parameter is applied as a mask  (AND'ed  with)
              to  the  changed  permission  bits,  thus preventing any bits not in this mask from
              being modified. Essentially, zero bits in this mask may be treated as a set of bits
              the user is not allowed to change.

              如未明確設定此選項,則把此選項設爲0777,允許用戶修改文件的所有user/group/world這些權
              限.

              注意,可通過其它手段訪問到Samba服務器的用戶可以輕而易舉地繞過此限制,所以此選項只對獨
              立的服務器系統有用.多數普通系統的管理員可以將它保留爲0777.

              參見 force directory security mode, directory security mask, force security mode 選
              項.

              缺省設置: security mask = 0777

              示例: security mask = 0770

       server schannel (G)
              This controls whether the server offers or even demands the  use  of  the  netlogon
              schannel.  server schannel = no does not offer the schannel, server schannel = auto
              offers the schannel but does not enforce it,  and  server  schannel  =  yes  denies
              access  if the client is not able to speak netlogon schannel. This is only the case
              for Windows NT4 before SP4.

              Please note that with this  set  to  no  you  will  have  to  apply  the  WindowsXP
              requireSignOrSeal-Registry patch found in the docs/Registry subdirectory.

              缺省設置: server schannel = auto

              示例: server schannel = yes

       server signing (G)
              This  controls  whether the server offers or requires the client it talks to to use
              SMB signing. Possible values are auto, mandatory and disabled.

              When set to auto, SMB signing is offered, but not enforced. When set to  mandatory,
              SMB signing is required and if set to disabled, SMB signing is not offered either.

              缺省設置: client signing = False

       server string (G)
              此選項在打印管理器中的打印機信息對話框以及在net view(網上鄰居)的IPC連接中顯示的服務
              器信息.它可以是任何你希望向用戶顯示的字串.

              它還設置顯示在瀏覽列表中主機名後的內容.

              %v 將替換爲Samba版本號

              %h 將替換爲主機名

              缺省設置: server string = Samba %v

              示例: server string = University of GNUs Samba Server

       set directory (S)
              如果 set directory = no,則使用服務的用戶不能用setdir命令更變目錄.

              setdir命令只在Digital Pathworks客戶端中實現.參見Pathworks文檔的細節.

              缺省設置: set directory = no

       set primary group script (G)
              Thanks to the Posix subsystem in NT a Windows User has a primary group in  addition
              to  the auxiliary groups. This script sets the primary group in the unix userdatase
              when an administrator sets the primary group from the windows user manager or  when
              fetching  a  SAM  with  net  rpc  vampire.  %u will be replaced with the user whose
              primary group is to be set. %g will be replaced with the group to set.

              缺省設置: No default value

              示例: set primary group script = /usr/sbin/usermod -g '%g' '%u'

       set quota command (G)
              The set quota command should only be used whenever there is no operating system API
              available from the OS that samba can use.

              This  parameter  should  specify  the  path  to a script that can set quota for the
              specified arguments.

              The specified script should take the following arguments:

              1 - quota type .TP 3 • 1 - user quotas .TP • 2 - user default quotas (uid = -1) .TP
              • 3 - group quotas .TP • 4 - group default quotas (gid = -1) .LP

              2 - id (uid for user, gid for group, -1 if N/A)

              3 - quota state (0 = disable, 1 = enable, 2 = enable and enforce)

              4 - block softlimit

              5 - block hardlimit

              6 - inode softlimit

              7 - inode hardlimit

              8(optional) - block size, defaults to 1024

              The script should output at least one line of data.

              參見 get quota command 選項。

              缺省設置: set quota command =

              示例: set quota command = /usr/local/sbin/set_quota

       share modes (S)
              此選項在一個文件打開時允許或禁止share  modes.此模式可用於使客戶獲得對一個文件獨佔的
              讀或寫訪問.

              這些打開模式UNIX是不直接支持的,所以要用共享內存或在UNIX不支持共享內存時(一般都支
              持)用鎖定文件來模擬.

              允許共享模式的選項是DENY_DOS, DENY_ALL, DENY_READ,DENY_WRITE, DENY_NONEDENY_FCB.

              缺省情況下此選項提供了完全的共享兼容和許可.

              你 不應 把此選項關閉因爲很多Windows應用會因此停止運行。

              缺省設置: share modes = yes

       short preserve case (S)
              此布爾值選項控制着如果新文件符合8.3文件名格式(所有字母都爲大寫且長度適當),則以大寫
              字母建立文件,否則就轉換爲default case .此選項可與preserve case =  yes選項聯用,以允
              許長文件名保留大小寫,同時短文件名轉換爲小寫。

              參見 NAME MANGLING 段.

              缺省設置: short preserve case = yes

       show add printer wizard (G)
              With  the  introduction of MS-RPC based printing support for Windows NT/2000 client
              in Samba 2.2, a "Printers..." folder will  appear  on  Samba  hosts  in  the  share
              listing.  Normally  this  folder will contain an icon for the MS Add Printer Wizard
              (APW). However, it is possible to disable this feature regardless of the  level  of
              privilege of the connected user.

              Under  normal  circumstances,  the Windows NT/2000 client will open a handle on the
              printer server with OpenPrinterEx() asking for  Administrator  privileges.  If  the
              user  does not have administrative access on the print server (i.e is not root or a
              member of the printer admin group), the OpenPrinterEx() call fails and  the  client
              makes  another  open  call  with a request for a lower privilege level. This should
              succeed, however the APW icon will not be displayed.

              Disabling  the  show  add  printer  wizard  parameter   will   always   cause   the
              OpenPrinterEx()  on  the server to fail. Thus the APW icon will never be displayed.
              Note :This does not prevent the same user from having administrative  privilege  on
              an individual printer.

              參見 addprinter command, deleteprinter command, printer admin

              Default :show add printer wizard = yes

       shutdown script (G)
              This parameter only exists in the HEAD cvs branch This a full path name to a script
              called by smbd(8) that should start a shutdown procedure.

              This command will be run as the user connected to the server.

              %m %t %r %f parameters are expanded:

              %m will be substituted with the shutdown message sent to the server.

              %t will be substituted with the  number  of  seconds  to  wait  before  effectively
              starting the shutdown procedure.

              %r will be substituted with the switch -r. It means reboot after shutdown for NT.

              %f  will  be  substituted  with  the switch -f. It means force the shutdown even if
              applications do not respond for NT.

              缺省設置: None.

              示例: shutdown script = /usr/local/samba/sbin/shutdown %m %t %r %f

              Shutdown script example:

              #!/bin/bash

              $time=0
              let "time/60"
              let "time++"

              /sbin/shutdown $3 $4 +$time $1 &

              Shutdown does not return so we need to launch it in background.

              參見 abort shutdown script.

       smb passwd file (G)
              此選項設置加密口令文件smbpasswd的路徑.缺省路徑在編譯samba時指定.

              缺省設置: smb passwd file = ${prefix}/private/smbpasswd

              示例: smb passwd file = /etc/samba/smbpasswd

       smb ports (G)
              Specifies which ports the server should listen on for SMB traffic.

              缺省設置: smb ports = 445 139

       socket address (G)
              此選項允許你控制samba監聽連接所用的地址.它用於在一個服務器上支持多個配置不同的虛擬
              接口.缺省情況下samba會在任何地址上都接受連接請求.

              By default Samba will accept connections on any address.

              示例: socket address = 192.168.2.20

       socket options (G)
              此選項設置用於與客戶端交談的套接字選項.

              套接字選項是使用在允許調整連接的操作系統的網絡層的控制命令.

              此選項通常用於在局域網上優化調整samba服務器的性能.因爲samba無法知道與你的網絡所對應
              的優化選項,所以你必須自己進行試驗並作出選擇.我們強烈推薦你先閱讀與你的操作系統有關
              的相應文件(也許man setsockopt會有幫助).

              你可能會發現在有些系統上samba會在你使用一個選項時發出"Unknown   socket  option"的信
              息.這就說明你沒有正確拼寫或者需要爲操作系統添加一個包含文件到includes.h中.如有後面
              指出的問題請寫信到samba-bugs@samba.org.

              只要操作系統允許,你可以以任何方法組合任何所支持的套接字選項.

              當前可用於此選項的可設置套接字選項列表有:

              SO_KEEPALIVE

              SO_REUSEADDR

              SO_BROADCAST

              TCP_NODELAY

              IPTOS_LOWDELAY

              IPTOS_THROUGHPUT

              SO_SNDBUF *

              SO_RCVBUF *

              SO_SNDLOWAT *

              SO_RCVLOWAT *

              標有'*'的要使用一個整數參數.其它的有時使用1或0代表允許或禁止該選項,如未指定1或0則缺
              省值都爲允許.

              要指定一個變量,用"SOME_OPTION=VALUE"格式。比如可以是SO_SNDBUF=8192.注意,在"="前後
              不能有任何空格.

              如在局域網上,則使用下面這個是比較明智的:

              socket options = IPTOS_LOWDELAY

              如有一個局域網則可以試一下:

              socket options = IPTOS_LOWDELAY TCP_NODELAY

              如有一個廣域網,則試一下IPTOS_THROUGHPU.

              注意有些選項可導致samba服務器完全失效.小心使用它們!

              缺省設置: socket options = TCP_NODELAY

              示例: socket options = IPTOS_LOWDELAY

       source environment (G)
              This  parameter causes Samba to set environment variables as per the content of the
              file named.

              If the value of this parameter starts with a "|" character then  Samba  will  treat
              that  value  as  a pipe command to open and will set the environment variables from
              the output of the pipe.

              The contents of the file or the output of the  pipe  should  be  formatted  as  the
              output of the standard Unix env(1) command. This is of the form:

              Example environment entry:

              SAMBA_NETBIOS_NAME = myhostname

              缺省設置: No default value

              Examples: source environment = |/etc/smb.conf.sh

              示例: source environment = /usr/local/smb_env_vars

       stat cache (G)
              此選項檢測smbd(8)是否使用緩存以提升映射不分大小寫名稱的速度.你無須更改此選項.

              缺省設置: stat cache = yes

       strict allocate (S)
              This  is  a  boolean  that  controls  the  handling of disk space allocation in the
              server. When this is set to yes the server will change from UNIX behaviour  of  not
              committing  real  disk  storage  blocks  when  a  file  is  extended to the Windows
              behaviour of actually forcing the disk system to allocate real storage blocks  when
              a  file  is  created or extended to be a given size. In UNIX terminology this means
              that Samba will stop creating sparse files. This can be slow on some systems.

              When strict allocate is no the server does sparse disk block allocation when a file
              is extended.

              Setting this to yes can help Samba return out of quota messages on systems that are
              restricting the disk quota of users.

              缺省設置: strict allocate = no

       strict locking (S)
              此布爾量選項控制服務器對文件鎖的處理.當設爲yes,則服務器對文件鎖檢查每次讀寫訪問,並
              拒絕鎖存在時的訪問.在有些系統上這可能會很慢.

              當禁用strict locking時,服務器只在客戶明確要求時才爲他們檢查文件鎖.

              循規蹈矩的客戶總是在重要的時候要求檢查文件鎖,所以在多數情況下strict  locking = no是
              可取的.

              缺省設置: strict locking = no

       strict sync (S)
              很多Windows應用(包括Windows             98瀏覽器)都會干擾對刷新緩衝區內容到磁盤的操
              作.在UNIX下,一次同步調用強制進程掛起,直到內核確保把所有磁盤緩存區中的未完成數據安全
              地存到固定存儲設備中爲止.此操作很慢,而且只能很少用到.把此選項設爲no      (缺省值)說
              明smbd(8) 忽略Windows應用請求的一次同步調用.這樣只有在Samba運行的操作系統崩潰時纔可
              能丟失數據,因此缺省設置危險性很小.另外,它修正人們報告的很多關於Windows98瀏覽器拷貝
              文件的性能問題.

              參見 sync always 選項。

              缺省設置: strict sync = no

       sync always (S)
              此布爾量選項控制是否在寫操作結束前把所寫的內容寫到固定存儲設備上.如果爲no則服務器將
              在每次寫調用中讓客戶請求來操縱它(客戶可以設置一個位碼來指出要同步一次特殊的寫操
              作).如果爲yes則在每次寫操作後調用一次fsync()        以確保將數據寫到磁盤上.注意必須
              把strict sync選項設爲yes以使本選項產生效果.

              參見 strict sync 選項。

              缺省設置: sync always = no

       syslog (G)
              此選項決定samba調試信息號如何映射爲系統syslog的記錄等級.調試級0映射
              爲syslog的LOG_ERR,調試級1映射爲     LOG_WARNING,調試級2映射爲LOG_NOTICE,調試級3映射
              爲LOG_INFO.所有更高的級別號映射爲 LOG_DEBUG.

              此選項設置了對syslog發送信息的閾值.只有小於此值的調試級信息號才發給syslog.

              缺省設置: syslog = 1

       syslog only (G)
              此選項使samba只把調試級別號記錄到系統syslog,而不是調試記錄文件.

              缺省設置: syslog only = no

       template homedir (G)
              When filling out the user information for a Windows NT user, the winbindd(8) daemon
              uses  this  parameter to fill in the home directory for that user. If the string %D
              is present it is substituted with the user's Windows NT domain name. If the  string
              %U is present it is substituted with the user's Windows NT user name.

              缺省設置: template homedir = /home/%D/%U

       template primary group (G)
              This   option   defines  the  default  primary  group  for  each  user  created  by
              winbindd(8)'s  local  account  management  functions  (similar  to  the  'add  user
              script').

              缺省設置: template primary group = nobody

       template shell (G)
              When filling out the user information for a Windows NT user, the winbindd(8) daemon
              uses this parameter to fill in the login shell for that user.

              缺省設置: template shell = /bin/false

       time offset (G)
              此選項是個加入到轉換標準GMT爲當地時間操作的分鐘數.如果你向很多有不正確保存時間操作
              的主機提供服務時這就很有用了.

              缺省設置: time offset = 0

              示例: time offset = 60

       time server (G)
              此選項檢測nmbd(8) 是否以時間服務器身份向Windows客戶通告自身.

              缺省設置: time server = no

       timestamp logs (G)
              與  debug timestamp 同義.

       unicode (G)
              Specifies  whether  Samba  should  try to use unicode on the wire by default. Note:
              This does NOT mean that samba will assume that the unix machine uses unicode!

              缺省設置: unicode = yes

       unix charset (G)
              Specifies the charset the unix machine Samba runs on uses. Samba needs to know this
              in order to be able to convert text to the charsets other SMB clients use.

              缺省設置: unix charset = UTF8

              示例: unix charset = ASCII

       unix extensions (G)
              This  boolean  parameter controls whether Samba implments the CIFS UNIX extensions,
              as defined by HP. These extensions enable Samba to better serve UNIX  CIFS  clients
              by  supporting features such as symbolic links, hard links, etc... These extensions
              require a similarly enabled client, and are of no current use to Windows clients.

              缺省設置: unix extensions = yes

       unix password sync (G)
              此布爾量選項控制samba是否在smbpasswd文件中的加密SMB口令被更改時嘗試用SMB口令來同
              步UNIX口令.如設爲yes以root身份調用passwd  program選項中指定的程序  - 以允許設置新
              的UNIX口令而無需訪問原UNIX口令(因爲更改SMB口令時代碼不訪問明文的原口令而只涉及新口
              令).

              參見 passwd program,  passwd chat.

              缺省設置: unix password sync = no

       update encrypted (G)
              此布爾量選項使以明文口令登錄的用戶在登錄時自動更新smbpasswd文件中的加密 (散列計算過
              的)口令.此選項允許一個站點從明文口令驗證方式(以明文口令驗證用        戶賬號並再次檢
              查UNIX賬號數據庫)移植到加密口令驗證方式(SMB的詢問/響應驗證  機制)而無需強制所有用戶
              在移植時通過smbpasswd重新輸入他們的口令.這對改變加 密口令移交要較長週期這種狀況來說
              很方便.一旦所有用戶都在smbpasswd文件中擁 有他們加密過的口令,則此應該把此選項設爲no.

              爲了讓此選項正確工作,當它設爲yes時必須把 encrypt passwords選項設爲no .

              注意即使設置了此選項,smbd還是必須驗證用戶賬號,直到輸入合法的口令後才能正確連接並更
              新他們的散列計算(由smbpasswd完成)後的口令字.

              缺省設置: update encrypted = no

       use client driver (S)
              This parameter applies only to Windows NT/2000 clients. It has no effect on Windows
              95/98/ME  clients.  When serving a printer to Windows NT/2000 clients without first
              installing a valid printer driver on the Samba host, the client will be required to
              install a local printer driver. From this point on, the client will treat the print
              as a local printer and not a network printer connection.  This  is  much  the  same
              behavior that will occur when disable spoolss = yes.

              The  differentiating  factor is that under normal circumstances, the NT/2000 client
              will attempt to open the network printer using MS-RPC. The problem is that  because
              the  client  considers  the  printer  to  be  local,  it  will attempt to issue the
              OpenPrinterEx() call requesting access rights associated with the logged  on  user.
              If  the  user  possesses  local  administator rights but not root privilegde on the
              Samba host (often the case), the OpenPrinterEx() call will fail. The result is that
              the  client  will  now display an "Access Denied; Unable to connect" message in the
              printer queue window (even though jobs may successfully be printed).

              If this parameter is enabled for a printer, then any attempt to  open  the  printer
              with  the  PRINTER_ACCESS_ADMINISTER right is mapped to PRINTER_ACCESS_USE instead.
              Thus allowing the OpenPrinterEx() call to succeed. This parameter MUST not be  able
              enabled  on  a  print  share  which  has  valid print driver installed on the Samba
              server.

              參見 disable spoolss

              缺省設置: use client driver = no

       use mmap (G)
              This global parameter determines if the tdb internals of Samba can depend  on  mmap
              working  correctly on the running system. Samba requires a coherent mmap/read-write
              system memory cache. Currently only HPUX does not have such a coherent  cache,  and
              so  this  parameter  is  set  to  no  by default on HPUX. On all other systems this
              parameter should be left alone. This  parameter  is  provided  to  help  the  Samba
              developers track down problems with the tdb internal code.

              缺省設置: use mmap = yes

       user (S)
              與 username 同義

       username (S)
              在逗號分隔的列表中指定多個用戶以用於輪流(從左到右)測試所提供的口令.

              只有當主機無法提供它自己的用戶名時才需要username選項。當用COREPLUS 協議或你的用戶擁
              有與UNIX用戶名不同的WfWg用戶名時就會有這樣的情況.在這兩種                      情況
              下,用\\server\share%user語句代替會更好的.

              在大多數情況下username選項並不是最好的解決方案,因爲它意味着Samba會 嘗試對username選
              項行中的每個用戶名輪流作測試.這樣做是很慢的,而且萬 一很多用戶重複口令的話這就是個壞
              主意了.錯誤使用此選項可能會帶來超時或安全 缺陷.

              samba依靠底層的UNIX安全.此選項不限制登錄者,它只對Samba服務器提供響應所提 供口令的用
              戶名的線索.任何喜歡的人都可以登錄,而且如果他們只是啓動一次 telnet對話的話不會造成破
              壞.進程以登錄的用戶身份運行,所以他們無法做任何他 們不能做的事兒.

              要對一組特殊的用戶限制一個服務的話可以用 valid users  選項.

              如果任何用戶名以'@'字符開始則此用戶名將首先在NIS網絡組列表(如果Samba編譯 時加入了網
              絡組支持的話)中進行查找,然後在UNIX用戶組數據庫中查找並展開成屬 於以此名爲組的所有用
              戶的列表.

              如果任何用戶名以'+'字符開始則此用戶名只在UNIX用戶組數據庫中進行查找並展開成屬於以此
              名爲組的所有用戶的列表.

              如果任何用戶名以'&'字符開始則此用戶名只在NIS網絡組列表(如果Samba編譯時加入了網絡組
              支持的話)中進行查找並展開成屬於以此名爲組的所有用戶的列表.

              注意通過用戶組數據庫進行查找要花很長時間,在此期間有些客戶可能會超時.

              查看 NOTE ABOUT USERNAME/PASSWORD VALIDATION 段來獲得這個選項如何決定訪問服務方面的
              信息。

              缺省設置: 如果是guest服務就是guest帳號,否則是空字符串.

              示例:username = fred, mary, jack, jane, @users, @pcgroup

       username level (G)
              此選項在很多DOS客戶發送全大寫的用戶名時,幫助samba嘗試和“猜測”實際 UNIX用戶名.對於缺
              省情況,Samba嘗試所有小寫形式,然後是首字母大寫形式,如果該 用戶名在UNIX主機上沒有找到
              則失敗.

              如果把此選項設爲非0,則情況就改變了.此選項指定的是用於嘗試同時檢測UNIX用戶名的大寫字
              母的組合數.數字越高,則嘗試的組合數越多,但用戶名的發現也越慢.當在你的UNIX主機上有奇
              特的用戶名如AstrangeUser 時使用此選項.

              缺省設置: username level = 0

              示例: username level = 5

       username map (G)
              此選項允許你指定一個包含對客戶機到服務器上的用戶名映射的文件.它可用於幾個目的.最常
              見的是把用DOS或Windows主機的用戶的名稱映射到UNIX主機上的用戶.其它還有把多個用戶映射
              到單個用戶名上以使他們可以更簡單地共享文件.

              映射文件被逐行解析.每個行都應該在'='號左邊包含一個UNIX用戶名,而在右邊跟上一列用戶
              名.右邊的用戶名列表可以包含@group形式的名稱,它表示匹配任何組中的UNIX用戶名.特殊客戶
              名'*'是一個通配符用於匹配任何名稱.映射文件的每個行可以達到1023個字符的長度.

              對文件的處理是在每個行上取得提供的用戶名並把它與'='號右邊的每個用戶名進行比較.如果
              提供的名稱匹配右邊的任何名稱則用左邊的名稱替換右邊的.然後繼續處理下一行.

              忽略以'#' 或 ';'號開始的行.

              當在行中發現了匹配,則在以'!'開始的行後中止處理,否則繼續處理每一行的映射.當你在文件
              中用了通配映射的話'!'就很有用了.

              例如把名稱adminadministrator映射爲UNIX名 root,你可以這樣:

              root = admin administrator

              或把UNIX組 system中的任何人映射爲UNIX名sys就可以這樣:

              sys = @system

              可以在一個用戶名映射文件中包含很多映射關係.

              如果你的系統支持NIS NETGROUP選項,則在使用/etc/group 匹配組之前先檢查網絡組數據庫.

              你可以通過在名稱上使用雙引號來映射含有空格的Windows用戶名.例如:

              tridge = "Andrew Tridgell"

              將把windows用戶名"Andrew Tridgell"映射爲unix用戶名"tridge".

              以下示例將把mary和fred映射爲unix用戶sys,然後把其餘的映射爲guest.注意使用'!'符號可以
              告訴Samba如果在該行獲得一個匹配的話就停止處理.

              !sys = mary fred
              guest = *

              注意重映射作用於所有出現用戶名的地方.因此如果你連接到\\server\fred而 fred已被重映射
              爲 mary,則你實際會連接到\\server\mary"並需要提供mary的口令而不是  fred的.這種情況只
              有一個例外,那就是用戶名是被傳到  password server(如果你有一個的話)驗證的.口令服務器
              會接收客戶提供的未經修改的用戶名.

              同時要注意反向映射是不會出現的.這主要影響的是打印任務.已經被映射的用戶會在刪除打印
              任務時遇到麻煩,因爲WfWg上的打印管理器會認爲他們不是打印任務的屬主.

              缺省設置: no username map

              示例: username map = /usr/local/samba/lib/users.map

       users (S)
              與  username 同義.

       use sendfile (S)
              If  this  parameter  is  yes,  and Samba was built with the --with-sendfile-support
              option, and the underlying operating system supports  sendfile  system  call,  then
              some  SMB  read  calls  (mainly  ReadAndX  and ReadRaw) will use the more efficient
              sendfile system call for files that are exclusively oplocked. This  may  make  more
              efficient  use  of  the  system  CPU's and cause Samba to be faster. This is off by
              default as it's effects are unknown as yet.

              缺省設置: use sendfile = no

       use spnego (G)
              This variable controls controls whether samba will try to use Simple and  Protected
              NEGOciation  (as  specified  by  rfc2478) with WindowsXP and Windows2000 clients to
              agree upon an authentication mechanism. Unless further issues are  discovered  with
              our SPNEGO implementation, there is no reason this should ever be disabled.

              缺省設置: use spnego = yes

       utmp (G)
              This  boolean parameter is only available if Samba has been configured and compiled
              with the option  --with-utmp. If set to yes then Samba will attempt to add utmp  or
              utmpx  records  (depending  on  the UNIX system) whenever a connection is made to a
              Samba server. Sites may use this to record the user connecting to a Samba share.

              Due to the requirements of the utmp record, we are  required  to  create  a  unique
              identifier  for the incoming user. Enabling this option creates an n^2 algorithm to
              find this number. This may impede performance on large installations.

              參見  utmp directory 選項。

              缺省設置: utmp = no

       utmp directory (G)
              This parameter is only available if Samba has been configured and compiled with the
              option   --with-utmp.  It  specifies a directory pathname that is used to store the
              utmp or utmpx files (depending on the UNIX system) that record user connections  to
              a  Samba  server.  參見  utmp 選項。 By default this is not set, meaning the system
              will use whatever utmp file the native system is set to use (usually  /var/run/utmp
              on Linux).

              缺省設置: no utmp directory

              示例: utmp directory = /var/run/utmp

       -valid (S)
              This  parameter  indicates whether a share is valid and thus can be used. When this
              parameter is set to false, the share will be in no way visible nor accessible.

              This option should not be used by regular users but might be of help to developers.
              Samba uses this option internally to mark shares as deleted.

              缺省設置: True

       valid users (S)
              這是一份允許登錄服務項的用戶列表.以'@','+'和'&'開始的名稱用invalid users 選項中的規
              則進行解析.

              如果此項爲空(缺省)則任何用戶都可以登錄.如果一個用戶名同時存在於此列表及invalid
              users列表,則拒絕此用戶訪問.

              %S 替換爲當前服務名. 這在[homes]段裏非常有用.

              參見 invalid users

              缺省設置:  (任何人都不會被拒絕)

              示例: valid users = greg, @pcusers

       veto files (S)
              這是一份既不可見又不可訪問的文件及目錄的列表.在列表中的每一項必須用'/'進行分隔,項目
              中允許有空格.可以用DOS通配符'*'和'?'來指定多個文件或目錄.

              每項必須是一個UNIX路徑,而非一個DOS路徑,同時必須不含 UNIX目錄分隔符'/'.

              注意case sensitive選項適用於對文件的禁止目的.

              需要明白這個選項的很重要的一個特點:     在Samba刪除一個目錄時的行爲。如果一個目錄除
              了veto files之外不包含任何內容,刪除操作將失敗,除非設置了delete veto filesyes.

              設置此選項會影響Samba的性能,因爲它將強制在掃描所有文件和目錄時檢查是否匹配.

              參見 hide filescase sensitive.

              缺省設置: 沒有隱藏任何文件.

              示例:

              ; 隱藏任何文件名帶有'Security'的文件,
              ; 任何擴展名是.tmp的文件,任何文件名帶有'root'的文件
              veto files = /*Security*/*.tmp/*root*/

              ; 隱藏NetAtalk服務器創建的Apple專用的文件
              veto files = /.AppleDouble/.bin/.AppleDesktop/Network Trash Folder/

       veto oplock files (S)
              此選項只在對一個共享打開了oplocks選項時纔有效.它允許Samba管理員在所選文件上選擇性地
              關閉允許oplocks,這些文件可以用通配符列表來匹配,類擬於在veto files  選項中所用的通配
              符列表.

              缺省設置: 沒有隱藏oplocks許可

              你可能想在已知客戶會猛烈爭奪的文件上使用此項.在NetBench   SMB基準程序下面就是個好例
              子,它導致客戶猛烈地對以.SEM後綴的文件進行連接.爲使Samba不在這些文件上允許oplocks,你
              可以在[global]段或特定的NetBench共享中使用此行:

              示例: veto oplock files = /*.SEM/

       vfs object (S)
              與 vfs objects 同義.

       vfs objects (S)
              This  parameter  specifies  the  backend  names  which  are  used for Samba VFS I/O
              operations. By default, normal disk I/O  operations  are  used  but  these  can  be
              overloaded with one or more VFS objects.

              缺省設置: no value

              示例: vfs objects = extd_audit recycle

       volume (S)
              此選項允許你忽略共享項提供的卷標.這對於那些堅持要使用一個特殊卷標的安裝程序光盤來說
              很有用.缺省就是共享項的卷標.

              缺省設置: 共享的名稱

       wide links (S)
              此選項控制服務器是否跟蹤UNIX文件系統中的符號鏈接.指向服務器導出的目錄樹的鏈接總是被
              允許的;此選項只是控制對導出目錄樹以外的區域的訪問情況.

              注意設置此選項可對服務器性能產生負面影響,因爲samba必須做一些額外的系統調用以檢查那
              些鏈接.

              缺省設置: wide links = yes

       winbind cache time (G)
              This parameter specifies the number of seconds the winbindd(8)  daemon  will  cache
              user and group information before querying a Windows NT server again.

              缺省設置: winbind cache type = 300

       winbind enable local accounts (G)
              This  parameter controls whether or not winbindd will act as a stand in replacement
              for the various account management hooks in smb.conf (e.g. 'add user  script').  If
              enabled,  winbindd  will  support the creation of local users and groups as another
              source of UNIX account information available via getpwnam() or getgrgid(), etc...

              缺省設置: winbind enable local accounts = yes

       winbind enum groups (G)
              On large installations using winbindd(8)  it  may  be  necessary  to  suppress  the
              enumeration  of  groups  through the setgrent(), getgrent() and endgrent() group of
              system calls. If the winbind enum groups parameter is no, calls to  the  getgrent()
              system call will not return any data.

              Warning: Turning off group enumeration may cause some programs to behave oddly.

              缺省設置: winbind enum groups = yes

       winbind enum users (G)
              On  large  installations  using  winbindd(8)  it  may  be necessary to suppress the
              enumeration of users through the setpwent(), getpwent()  and  endpwent()  group  of
              system  calls.  If  the  winbind  enum users parameter is no, calls to the getpwent
              system call will not return any data.

              Warning: Turning off user enumeration may cause some programs to behave oddly.  For
              example,  the  finger  program  relies  on having access to the full user list when
              searching for matching usernames.

              缺省設置: winbind enum users = yes

       winbind gid (G)
              This parameter is now an alias for idmap gid

              The winbind gid parameter specifies the range of group ids that  are  allocated  by
              the  winbindd(8)  daemon.  This range of group ids should have no existing local or
              NIS groups within it as strange conflicts can occur otherwise.

              缺省設置: winbind gid = <空字符串>

              示例: winbind gid = 10000-20000

       winbind separator (G)
              This parameter allows an admin to define the character used when listing a username
              of  the  form  of  DOMAIN  \user.  This parameter is only applicable when using the
              pam_winbind.so and nss_winbind.so modules for UNIX services.

              Please note that setting this parameter to + causes problems with group  membership
              at  least  on  glibc systems, as the character + is used as a special character for
              NIS in /etc/group.

              缺省設置: winbind separator = 

              示例: winbind separator = +

       winbind trusted domains only (G)
              This parameter is designed to allow Samba servers  that  are  members  of  a  Samba
              controlled  domain  to  use UNIX accounts distributed vi NIS, rsync, or LDAP as the
              uid's for  winbindd  users  in  the  hosts  primary  domain.  Therefore,  the  user
              'SAMBA\user1'  would  be  mapped  to  the account 'user1' in /etc/passwd instead of
              allocating a new uid for him or her.

              缺省設置: winbind trusted domains only = <no>

       winbind uid (G)
              This parameter is now an alias for idmap uid

              The winbind gid parameter specifies the range of user ids that are allocated by the
              winbindd(8)  daemon.  This  range of ids should have no existing local or NIS users
              within it as strange conflicts can occur otherwise.

              缺省設置: winbind uid = <空字符串>

              示例: winbind uid = 10000-20000

       winbind use default domain (G)
              This parameter specifies whether the winbindd(8) daemon  should  operate  on  users
              without  domain  component  in their username. Users without a domain component are
              treated as is part of the winbindd server's own domain. While this does not benifit
              Windows  users,  it  makes SSH, FTP and e-mail function in a way much closer to the
              way they would in a native unix system.

              缺省設置: winbind use default domain = <no>

              示例: winbind use default domain = yes

       wins hook (G)
              當把Samba作爲一臺WINS服務器運行時,此選項允許你調用一個外部程序更改WINS數據庫.此項主
              要用於動態更新外部名字解析數據庫,如動態DNS.

              此選項以如下形式指定要調用的一個腳本名或可執行程序:

              wins_hook operation name nametype ttl IP_list

              第一部分參數是opration(操作符),它有三種:"add"、"delete"和"refresh".在很多情況下該
              操作符可以忽略,因爲其它選項可提供足夠的信息.注意當有名稱以前沒有加入過,則有時會用
              到"refresh",在這種情況下,它應該和"add"有同樣含義.

              第二部分參數是netbios名.如果該名稱不是合法名的話,該功能就不運行.合法的名稱應只包含
              字母,數字,減號,下劃線和句點.

              第三部分參數是用2位十六進制數字表示的netbios名稱類型.

              第四部分參數是以秒計算的名稱有效時間TTL (time to live).

              第五部分是當前該名稱所註冊的IP地址表.如果表爲空則該名稱被刪除.

              一個調用BIND動態DNS更新程序nsupdate的腳本示例在samba源代碼的示例目錄可以找到.

       wins partners (G)
              A space separated list  of  partners'  IP  addresses  for  WINS  replication.  WINS
              partners  are  always  defined  as push/pull partners as defining only one way WINS
              replication  is  unreliable.  WINS  replication  is  currently   experimental   and
              unreliable between samba servers.

              缺省設置: wins partners =

              示例: wins partners = 192.168.0.1 172.16.1.2

       wins proxy (G)
              此布爾量選項控制nmbd(8) 是否代替其它主機響應廣播名字查詢.對一些舊版本客戶就可能需要
              把它設爲yes .

              缺省設置: wins proxy = no

       wins server (G)
              此選項指定nmbd要註冊的WINS服務器的IP地址(或DNS域名:IP地址優先(for  preference)).如
              果在你的網絡上有一臺WINS服務器,就應該把此項設爲該服務器的IP地址.

              如果你有多個子網的話,應該指定向你的WINS服務器

              If you want to work in multiple namespaces, you can give every wins server a 'tag'.
              For each tag, only one (working) server will be queried for a name. The tag  should
              be seperated from the ip address by a colon.

              注意,如有多子網並希望跨子網瀏覽工作正常的話,應該設置Samba指向一臺WINS服務器.

              缺省設置: 未啓用

              示例: wins server = mary:192.9.200.1 fred:192.168.3.199 mary:192.168.2.61

              For this example when querying a certain name, 192.19.200.1 will be asked first and
              if that doesn't respond 192.168.2.61 . If either of those  doesn't  know  the  name
              192.168.3.199 will be queried.

              示例: wins server = 192.9.200.1 192.168.2.61

       wins support (G)
              此布爾量選項控制nmbd(8)進程是否作爲WINS服務器.你不應該把它設爲yes,除非有多子網或希
              望特定的nmbd作爲你的WINS服務器.注意在網絡上有多臺WINS服務器時應把它設爲yes.

              缺省設置: wins support = no

       workgroup (G)
              此選項規定Samba所在的工作組以便讓客戶查詢.注意它也規定在使用security = domain時所用
              的域名.

              缺省設置: 編譯時設置爲 WORKGROUP

              示例: workgroup = MYGROUP

       writable (S)
              與  writeable 相同,是爲拼寫錯誤者準備的 :-)

       writeable (S)
              注意它與 read only 反義.

       write cache size (S)
              If  this integer parameter is set to non-zero value, Samba will create an in-memory
              cache for each oplocked file (it does not do  this  for  non-oplocked  files).  All
              writes  that  the  client  does  not request to be flushed directly to disk will be
              stored in this cache if possible. The cache is flushed onto disk when a write comes
              in  whose  offset  would  not  fit into the cache or when the file is closed by the
              client. Reads for the file are also served from this cache if the  data  is  stored
              within it.

              This cache allows Samba to batch client writes into a more efficient write size for
              RAID disks (i.e. writes may be tuned to be the RAID stripe size)  and  can  improve
              performance  on  systems where the disk subsystem is a bottleneck but there is free
              memory for userspace programs.

              The integer parameter specifies the size of  this  cache  (per  oplocked  file)  in
              bytes.

              缺省設置: write cache size = 0

              示例: write cache size = 262144

              for a 256k cache size per file.

       write list (S)
              此選項設置對服務項有讀寫權的用戶列表.如果正在連接的用戶屬於此列表,那他們就可以有寫
              入權,而不管read only爲何值.此列表可以用@group形式描述組名.

              注意如果一個用戶同時屬於讀列表和寫列表則擁有寫入權.

              參見 read list  選項。

              缺省設置: write list = <空字符串>

              示例: write list = admin, root, @staff

       write ok (S)
              注意它與 read only 反義.

       write raw (G)
              此選項規定服務器是否在從客戶端傳輸數據時支持原始方式寫SMB消息塊.你不應該更改它.

              缺省設置: write raw = yes

       wtmp directory (G)
              This parameter is only available if Samba has been configured and compiled with the
              option   --with-utmp.  It  specifies a directory pathname that is used to store the
              wtmp or wtmpx files (depending on the UNIX system) that record user connections  to
              a  Samba  server. The difference with the utmp directory is the fact that user info
              is kept after a user has logged out.

              參見 utmp 選項。 By default this is not set, meaning the system will  use  whatever
              utmp file the native system is set to use (usually /var/run/wtmp on Linux).

              缺省設置: no wtmp directory

              示例: wtmp directory = /var/log/wtmp

警告 WARNINGS

       雖然配置文件允許服務項名包含空格,但你的客戶端軟件就不一定了.因爲在比較中總是忽略空格,所以
       這不成問題 - 但應該認識到其它可能性.

       有一條類似提示,很多客戶特別是DOS客戶,會限制服務項名爲8個字符.雖然 smbd(8)沒有這樣的限制,但
       如果這樣的客戶截去部分服務項名的話,他們的連接嘗試會失敗.爲此你可能要保持你的服務項名在8個
       字符以內.

       對於管理員來說[homes] 和  [printers]特殊段的使用很容易,但對缺省屬性的多樣組合應該小心.當設
       計這些段時要特別仔細.特別是要確保假脫機目錄權限的正確性.

版本 VERSION

       此手冊頁是針對samba套件版本3.0的。

參見 SEE ALSO

       samba(7),   smbpasswd(8),   swat(8),   smbd(8),   nmbd(8),   smbclient(1),   nmblookup(1),
       testparm(1), testprns(1).

作者 AUTHOR

       samba軟件和相關工具最初由Andrew Tridgell創建。samba現在由Samba Team 作爲開源軟件來發展,類
       似linux內核的開發方式。

       最初的samba手冊頁是  Karl Auer寫的。 手冊頁源碼已經轉換爲YODL格式(另一種很好的開源軟件,可
       以在ftp://ftp.ice.rug.nl/pub/unix找到),由Jeremy  Sllison  更新到Samba2.0  版本。   Gerald
       Carter  在Samba2.2中將它轉化爲DocBook  格式。 Alexander Bokovoy 在Samba 3.0中實現了DocBook
       XML4.2 格式的轉換。

[中文版維護人]

       meaculpa <meaculpa@21cn.com>

[中文版最新更新]

       2000/12/08

《中國linux論壇man手冊頁翻譯計劃》:

       http://cmpp.linuxforum.net

       

       本頁面中文版由中文 man 手冊頁計劃提供。
       中文 man 手冊頁計劃:https://github.com/man-pages-zh/manpages-zh

                                                                                      SMB.CONF(5)