Provided by: manpages-zh_1.6.3.6-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)