Provided by: manpages-zh_1.5.2-1.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

                                                                                      SMB.CONF(5)