home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 20 NDrivers / 20-NDrivers.zip / samba193.zip / config.txt next >
Text File  |  1996-03-11  |  66KB  |  2,189 lines

  1.  
  2.  
  3.  
  4. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  5.  
  6.  
  7. NAME
  8.        smb.conf - configuration file for smbd
  9.  
  10. SYNOPSIS
  11.        smb.conf
  12.  
  13. DESCRIPTION
  14.        The  smb.conf  file  is a configuration file for the Samba
  15.        suite.
  16.  
  17.        smb.conf contains runtime  configuration  information  for
  18.        the  smbd  program.  The smbd program provides LanManager-
  19.        like services to clients using the SMB protocol.
  20.  
  21.  
  22. FILE FORMAT
  23.        The file consists of sections and  parameters.  A  section
  24.        begins with the name of the section in square brackets and
  25.        continues until the next section begins. Sections  contain
  26.        parameters of the form 'name = value'.
  27.  
  28.        The  file is line-based - that is, each newline-terminated
  29.        line represents either a comment,  a  section  name  or  a
  30.        parameter.
  31.  
  32.        Section and parameter names are not case sensitive.
  33.  
  34.        Only  the first equals sign in a parameter is significant.
  35.        Whitespace before or after the first equals sign  is  dis-
  36.        carded.  Leading, trailing and internal whitespace in sec-
  37.        tion and parameter names is irrelevant. Leading and trail-
  38.        ing whitespace in a parameter value is discarded. Internal
  39.        whitespace within a parameter value is retained  verbatim.
  40.  
  41.        Any  line  beginning  with  a semicolon is ignored, as are
  42.        lines containing only whitespace.
  43.  
  44.        Any line ending in a  is "continued" on the next  line  in
  45.        the customary unix fashion.
  46.  
  47.        The values following the equals sign in parameters are all
  48.        either a string (no quotes needed) or a boolean, which may
  49.        be given as yes/no, 0/1 or true/false. Case is not signif-
  50.        icant in boolean values, but is preserved in  string  val-
  51.        ues. Some items such as create modes are numeric.
  52.  
  53. SERVICE DESCRIPTIONS
  54.        Each  section  in  the configuration file describes a ser-
  55.        vice. The section name is the service name and the parame-
  56.        ters within the section define the service's attributes.
  57.  
  58.        There  are  three  special sections, [global], [homes] and
  59.        [printers], which are described under 'special  sections'.
  60.        The    following   notes   apply   to   ordinary   service
  61.  
  62.  
  63.  
  64. smb.conf                     11/10/94                           1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  71.  
  72.  
  73.        descriptions.
  74.  
  75.        A service consists of a directory to which access is being
  76.        given  plus  a  description of the access rights which are
  77.        granted to the user  of  the  service.  Some  housekeeping
  78.        options are also specifiable.
  79.  
  80.        Services are either filespace services (used by the client
  81.        as an extension of their native file systems) or printable
  82.        services  (used  by the client to access print services on
  83.        the host running the server).
  84.  
  85.        Services may be guest services, in which case no  password
  86.        is  required  to access them. A specified guest account is
  87.        used to define access privileges in this case.
  88.  
  89.        Services other than guest services will require a password
  90.        to  access them. The client provides the username. As many
  91.        clients only provide passwords and not usernames, you  may
  92.        specify  a list of usernames to check against the password
  93.        using the "user=" option in the service definition.
  94.  
  95.        Note that the access rights  granted  by  the  server  are
  96.        masked  by  the  access rights granted to the specified or
  97.        guest user by the host system. The server does  not  grant
  98.        more access than the host system grants.
  99.  
  100.        The following sample section defines a file space service.
  101.        The user has write access to the path /home/bar. The  ser-
  102.        vice is accessed via the service name "foo":
  103.  
  104.             [foo]
  105.                  path = /home/bar
  106.                  writable = true
  107.  
  108.        The  following sample section defines a printable service.
  109.        The service is readonly, but printable. That is, the  only
  110.        write  access permitted is via calls to open, write to and
  111.        close a spool file. The 'guest ok' parameter means  access
  112.        will  be  permitted  as  the default guest user (specified
  113.        elsewhere):
  114.  
  115.             [aprinter]
  116.                  path = /usr/spool/public
  117.                  read only = true
  118.                  printable = true
  119.                  public = true
  120.  
  121.  
  122. SPECIAL SECTIONS
  123.    The [global] section
  124.           Parameters in this section apply to  the  server  as  a
  125.           whole,  or  are  defaults  for  services  which  do not
  126.           specifically define certain items. See the notes  under
  127.  
  128.  
  129.  
  130. smb.conf                     11/10/94                           2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  137.  
  138.  
  139.           'Parameters' for more information.
  140.  
  141.  
  142.    The [homes] section
  143.           If a section called 'homes' is included in the configu-
  144.           ration file, services connecting clients to their  home
  145.           directories can be created on the fly by the server.
  146.  
  147.           When  the connection request is made, the existing ser-
  148.           vices are scanned. If a match is found, it is used.  If
  149.           no  match  is  found,  the  requested  service  name is
  150.           treated as a user name and looked up in the local pass-
  151.           words file. If the name exists and the correct password
  152.           has been given, a service is  created  by  cloning  the
  153.           [homes] section.
  154.  
  155.           Some  modifications  are then made to the newly created
  156.           section:
  157.  
  158.              The service name is  changed  from  'homes'  to  the
  159.              located username
  160.  
  161.              If  no path was given, the path is set to the user's
  162.              home directory.
  163.  
  164.           If you decide to use a path= line in your [homes]  sec-
  165.           tion  then  you may find it useful to use the %S macro.
  166.           For example path=/data/pchome/%S would be useful if you
  167.           have  different  home directories for your PCs than for
  168.           unix access.
  169.  
  170.           This is a fast and simple way to give a large number of
  171.           clients access to their home directories with a minimum
  172.           of fuss.
  173.  
  174.           A similar process occurs if the requested service  name
  175.           is "homes", except that the service name is not changed
  176.           to that of the requesting user. This  method  of  using
  177.           the [homes] section works well if different users share
  178.           a client PC.
  179.  
  180.           The [homes] section can specify all  the  parameters  a
  181.           normal  service  section  can specify, though some make
  182.           more sense than others. The following is a typical  and
  183.           suitable [homes] section:
  184.  
  185.                [homes]
  186.                     writable = yes
  187.  
  188.           An important point:
  189.  
  190.              If guest access is specified in the [homes] section,
  191.              all home  directories  will  be  accessible  to  all
  192.              clients  without  a  password.  In the very unlikely
  193.  
  194.  
  195.  
  196. smb.conf                     11/10/94                           3
  197.  
  198.  
  199.  
  200.  
  201.  
  202. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  203.  
  204.  
  205.              event that this is actually desirable, it  would  be
  206.              wise to also specify read only access.
  207.  
  208.        Note  that  the  browseable flag for auto home directories
  209.        will be inherited from the global browseable flag, not the
  210.        [homes]  browseable  flag. This is useful as it means set-
  211.        ting browseable=no in the [homes] section  will  hide  the
  212.        [homes]  service  but make any auto home directories visi-
  213.        ble.
  214.  
  215.  
  216.    The [printers] section
  217.           This section works like [homes], but for printers.
  218.  
  219.           If a [printers] section  occurs  in  the  configuration
  220.           file,  users  are able to connect to any printer speci-
  221.           fied in the local host's printcap file.
  222.  
  223.           When a connection request is made,  the  existing  ser-
  224.           vices  are scanned. If a match is found, it is used. If
  225.           no match is found, but a [homes] section exists, it  is
  226.           used  as described above. Otherwise, the requested ser-
  227.           vice name is treated as a printer name and  the  appro-
  228.           priate printcap file is scanned to see if the requested
  229.           service name is a valid printer name.  If  a  match  is
  230.           found,  a new service is created by cloning the [print-
  231.           ers] section.
  232.  
  233.           A few modifications are then made to the newly  created
  234.           section:
  235.  
  236.              The service name is set to the located printer name
  237.  
  238.              If  no  printer  name was given, the printer name is
  239.              set to the located printer name
  240.  
  241.              If the service does not permit guest access  and  no
  242.              username  was  given,  the  username  is  set to the
  243.              located printer name.
  244.  
  245.           Note that the [printers] service MUST be printable - if
  246.           you  specify  otherwise, the server will refuse to load
  247.           the configuration file.
  248.  
  249.           Typically the path specified would be that of a  world-
  250.           writable spool directory with the sticky bit set on it.
  251.           A typical [printers] entry would look like this:
  252.  
  253.                [printers]
  254.                     path = /usr/spool/public
  255.                     writable = no
  256.                     public = yes
  257.                     printable = yes
  258.  
  259.  
  260.  
  261.  
  262. smb.conf                     11/10/94                           4
  263.  
  264.  
  265.  
  266.  
  267.  
  268. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  269.  
  270.  
  271.           All aliases given for a printer in  the  printcap  file
  272.           are  legitimate  printer  names as far as the server is
  273.           concerned. If your printing subsystem doesn't work like
  274.           that,  you  will have to set up a pseudo-printcap. This
  275.           is a file consisting of one or more lines like this:
  276.  
  277.                   alias|alias|alias|alias...
  278.  
  279.           Each alias should be an  acceptable  printer  name  for
  280.           your printing subsystem. In the [global] section, spec-
  281.           ify the new file as your  printcap.   The  server  will
  282.           then   only  recognise  names  found  in  your  pseudo-
  283.           printcap, which of course can contain whatever  aliases
  284.           you  like.  The  same technique could be used simply to
  285.           limit access to a subset of your local printers.
  286.  
  287.           An alias, by the way, is defined as  any  component  of
  288.           the first entry of a printcap record. Records are sepa-
  289.           rated by newlines, components (if there are  more  than
  290.           one) are separated by vertical bar symbols ("|").
  291.  
  292. PARAMETERS
  293.        Parameters define the specific attributes of services.
  294.  
  295.        Some parameters are specific to the [global] section (eg.,
  296.        security).  Some parameters are  usable  in  all  sections
  297.        (eg.,  create  mode).  All  others are permissible only in
  298.        normal  sections.  For  the  purposes  of  the   following
  299.        descriptions  the  [homes] and [printers] sections will be
  300.        considered normal.  The letter 'G'  in  parentheses  indi-
  301.        cates  that  a  parameter is specific to the [global] sec-
  302.        tion. The letter 'S' indicates that  a  parameter  can  be
  303.        specified  in  a secvice specific section. Note that all S
  304.        parameters can also be specified in the [global] section -
  305.        in  which  case they will define the default behaviour for
  306.        all services.
  307.  
  308.        Parameters are arranged here in alphabetical order -  this
  309.        may  not create best bedfellows, but at least you can find
  310.        them! Where there are synonyms, the preferred  synonym  is
  311.        described, others refer to the preferred synonym.
  312.  
  313.  
  314.    VARIABLE SUBSTITUTIONS
  315.        Many  of  the strings that are settable in the config file
  316.        can take substitutions. For example  the  option  "path  =
  317.        /tmp/%u" would be interpreted as "path = /tmp/john" if the
  318.        user connected with the username john.
  319.  
  320.        These substitutions are mostly noted in  the  descriptions
  321.        below,  but there are some general substitions which apply
  322.        whenever they might be relevant. These are:
  323.  
  324.        %S = the name of the current service, if any
  325.  
  326.  
  327.  
  328. smb.conf                     11/10/94                           5
  329.  
  330.  
  331.  
  332.  
  333.  
  334. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  335.  
  336.  
  337.        %P = the root directory of the current service, if any
  338.  
  339.        %u = user name of the current service, if any
  340.  
  341.        %U = session user name (the  user  name  that  the  client
  342.        wanted, not necessarily the same as the one they got)
  343.  
  344.        %H = the home directory of the user given by %u
  345.  
  346.        %v = the Samba version
  347.  
  348.        %h = the hostname that Samba is running on
  349.  
  350.        %m = the netbios name of the client machine (very useful)
  351.  
  352.        %L  =  the  netbios name of the server. This allows you to
  353.        change your config based on what  the  client  calls  you.
  354.        Your server can have a "dual personality".
  355.  
  356.        %M = the internet name of the client machine
  357.  
  358.        %d = The process id of the current server process
  359.  
  360.        %a = the architecture of the remote machine. Only some are
  361.        recognised, and those may not be 100%  reliable.  It  cur-
  362.        rently  recognises  Samba, WfWg, WinNT and Win95. Anything
  363.        else will be known as "UNKNOWN". If it gets it wrong  then
  364.        sending me a level 3 log should allow me to fix it.
  365.  
  366.        %I = The IP address of the client machine
  367.  
  368.        %T = the current date and time
  369.  
  370.        There are some quite creative things that can be done with
  371.        these substitutions and other smb.conf options.
  372.  
  373.  
  374.    NAME MANGLING
  375.        Samba supports "name mangling" so  that  Dos  and  Windows
  376.        clients  can  use files that don't conform to the 8.3 for-
  377.        mat. It can also be set to adjust the case of  8.3  format
  378.        filenames.
  379.  
  380.        There are several options that control the way mangling is
  381.        performed, and they are grouped here  rather  than  listed
  382.        separately.  For  the  defaults  look at the output of the
  383.        testparm program.
  384.  
  385.        All of these options can be set separately for  each  ser-
  386.        vice (or globally, of course).
  387.  
  388.        The options are:
  389.  
  390.        "mangle  case  =  yes/no"  controls  if  names  that  have
  391.  
  392.  
  393.  
  394. smb.conf                     11/10/94                           6
  395.  
  396.  
  397.  
  398.  
  399.  
  400. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  401.  
  402.  
  403.        characters that aren't of the "default" case are  mangled.
  404.        For  example, if this is yes then a name like "Mail" would
  405.        be mangled. Default no.
  406.  
  407.        "case sensitive = yes/no" controls whether  filenames  are
  408.        case  sensitive. If they aren't then Samba must do a file-
  409.        name search and match on passed names. Default no.
  410.  
  411.        "default case = upper/lower"  controls  what  the  default
  412.        case is for new filenames. Default lower.
  413.  
  414.        "preserve case = yes/no" controls if new files are created
  415.        with the case that the  client  passes,  or  if  they  are
  416.        forced to be the "default" case. Default no.
  417.  
  418.        "short preserve case = yes/no" controls if new files which
  419.        conform to 8.3 syntax, that is all in upper  case  and  of
  420.        suitable  length,  are  created upper case, or if they are
  421.        forced to be the "default" case. This option  can  be  use
  422.        with  "preserve  case  =  yes" to permit long filenames to
  423.        retain their case, while short names are lowered.  Default
  424.        no.
  425.  
  426.  
  427.    COMPLETE LIST OF GLOBAL PARAMETER
  428.        Here  is  a list of all global parameters. See the section
  429.        of each parameter for details.  Note that  some  are  syn-
  430.        onyms.
  431.  
  432.        auto services
  433.  
  434.        config file
  435.  
  436.        deadtime
  437.  
  438.        debuglevel
  439.  
  440.        default
  441.  
  442.        default service
  443.  
  444.        dfree command
  445.  
  446.        encrypt passwords
  447.  
  448.        getwd cache
  449.  
  450.        hosts equiv
  451.  
  452.        include
  453.  
  454.        keepalive
  455.  
  456.        lock dir
  457.  
  458.  
  459.  
  460. smb.conf                     11/10/94                           7
  461.  
  462.  
  463.  
  464.  
  465.  
  466. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  467.  
  468.  
  469.        load printers
  470.  
  471.        lock directory
  472.  
  473.        log file
  474.  
  475.        log level
  476.  
  477.        lpq cache time
  478.  
  479.        mangled stack
  480.  
  481.        max log size
  482.  
  483.        max packet
  484.  
  485.        max xmit
  486.  
  487.        message command
  488.  
  489.        null passwords
  490.  
  491.        os level
  492.  
  493.        packet size
  494.  
  495.        passwd chat
  496.  
  497.        passwd program
  498.  
  499.        password level
  500.  
  501.        password server
  502.  
  503.        preferred master
  504.  
  505.        preload
  506.  
  507.        printing
  508.  
  509.        printcap name
  510.  
  511.        protocol
  512.  
  513.        read bmpx
  514.  
  515.        read prediction
  516.  
  517.        read raw
  518.  
  519.        read size
  520.  
  521.        root
  522.  
  523.  
  524.  
  525.  
  526. smb.conf                     11/10/94                           8
  527.  
  528.  
  529.  
  530.  
  531.  
  532. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  533.  
  534.  
  535.        root dir
  536.  
  537.        root directory
  538.  
  539.        security
  540.  
  541.        server string
  542.  
  543.        smbrun
  544.  
  545.        socket options
  546.  
  547.        status
  548.  
  549.        strip dot
  550.  
  551.        time offset
  552.  
  553.        username map
  554.  
  555.        use rhosts
  556.  
  557.        valid chars
  558.  
  559.        workgroup
  560.  
  561.        write raw
  562.  
  563.  
  564.    COMPLETE LIST OF SERVICE PARAMETER
  565.        Here  is a list of all service parameters. See the section
  566.        of each parameter for details. Note  that  some  are  syn-
  567.        onyms.
  568.  
  569.        admin users
  570.  
  571.        allow hosts
  572.  
  573.        alternate permissions
  574.  
  575.        available
  576.  
  577.        browseable
  578.  
  579.        case sensitive
  580.  
  581.        case sig names
  582.  
  583.        copy
  584.  
  585.        create mask
  586.  
  587.        create mode
  588.  
  589.  
  590.  
  591.  
  592. smb.conf                     11/10/94                           9
  593.  
  594.  
  595.  
  596.  
  597.  
  598. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  599.  
  600.  
  601.        comment
  602.  
  603.        default case
  604.  
  605.        deny hosts
  606.  
  607.        directory
  608.  
  609.        dont descend
  610.  
  611.        exec
  612.  
  613.        force group
  614.  
  615.        force user
  616.  
  617.        guest account
  618.  
  619.        guest ok
  620.  
  621.        guest only
  622.  
  623.        hide dot files
  624.  
  625.        hosts allow
  626.  
  627.        hosts deny
  628.  
  629.        invalid users
  630.  
  631.        locking
  632.  
  633.        lpq command
  634.  
  635.        lprm command
  636.  
  637.        magic output
  638.  
  639.        magic script
  640.  
  641.        mangle case
  642.  
  643.        mangled names
  644.  
  645.        mangling char
  646.  
  647.        map archive
  648.  
  649.        map hidden
  650.  
  651.        map system
  652.  
  653.        max connections
  654.  
  655.  
  656.  
  657.  
  658. smb.conf                     11/10/94                          10
  659.  
  660.  
  661.  
  662.  
  663.  
  664. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  665.  
  666.  
  667.        min print space
  668.  
  669.        only guest
  670.  
  671.        only user
  672.  
  673.        path
  674.  
  675.        postexec
  676.  
  677.        postscript
  678.  
  679.        preserve case
  680.  
  681.        print command
  682.  
  683.        print ok
  684.  
  685.        printable
  686.  
  687.        printer
  688.  
  689.        printer name
  690.  
  691.        public
  692.  
  693.        read only
  694.  
  695.        read list
  696.  
  697.        revalidate
  698.  
  699.        root postexec
  700.  
  701.        root preexec
  702.  
  703.        set directory
  704.  
  705.        share modes
  706.  
  707.        short preserve case
  708.  
  709.        strict locking
  710.  
  711.        sync always
  712.  
  713.        user
  714.  
  715.        username
  716.  
  717.        users
  718.  
  719.        valid users
  720.  
  721.  
  722.  
  723.  
  724. smb.conf                     11/10/94                          11
  725.  
  726.  
  727.  
  728.  
  729.  
  730. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  731.  
  732.  
  733.        volume
  734.  
  735.        wide links
  736.  
  737.        writable
  738.  
  739.        write ok
  740.  
  741.        writeable
  742.  
  743.        write list
  744.  
  745.  
  746.    EXPLANATION OF EACH PARAMETER
  747.    admin users (G)
  748.        This is a list of users who will be granted administrative
  749.        privilages on the share. This means that they will do  all
  750.        file operations as the super-user (root).
  751.  
  752.        You  should use this option very carefully, as any user in
  753.        this list will be able to do anything  they  like  on  the
  754.        share, irrespective of file permissions.
  755.  
  756.        Default:      no admin users
  757.  
  758.        Example:      admin users = jason
  759.  
  760.  
  761.    auto services (G)
  762.        This  is  a list of services that you want to be automati-
  763.        cally added to the browse lists. This is most  useful  for
  764.        homes  and  printers  services that would otherwise not be
  765.        visible.
  766.  
  767.        Note that if you just want all printers in  your  printcap
  768.        file loaded then the "load printers" option is easier.
  769.  
  770.        Default:      no auto services
  771.  
  772.        Example:      auto services = fred lp colorlp
  773.  
  774.  
  775.  
  776.    allow hosts (S)
  777.        A synonym for this parameter is 'hosts allow'.
  778.  
  779.        This parameter is a comma delimited set of hosts which are
  780.        permitted to  access  a  services.  If  specified  in  the
  781.        [global] section, matching hosts will be allowed access to
  782.        any service that does not specifically exclude  them  from
  783.        access.  Specific  services  my have their own list, which
  784.        override those specified in the [global] section.
  785.  
  786.        You can specify the  hosts  by  name  or  IP  number.  For
  787.  
  788.  
  789.  
  790. smb.conf                     11/10/94                          12
  791.  
  792.  
  793.  
  794.  
  795.  
  796. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  797.  
  798.  
  799.        example,  you could restrict access to only the hosts on a
  800.        Class  C  subnet  with  something  like  "allow  hosts   =
  801.        150.203.5.".  The  full syntax of the list is described in
  802.        the man page hosts_access(5).
  803.  
  804.        You can also specify hosts by network/netmask pairs and by
  805.        netgroup  names  if  your  system  supports netgroups. The
  806.        EXCEPT keyword can also be used to limit a wildcard  list.
  807.        The following examples may provide some help:
  808.  
  809.        Example 1: allow all IPs in 150.203.*.* except one
  810.  
  811.             hosts allow = 150.203. EXCEPT 150.203.6.66
  812.  
  813.        Example   2:   allow  hosts  that  match  the  given  net-
  814.        work/netmask
  815.  
  816.             hosts allow = 150.203.15.0/255.255.255.0
  817.  
  818.        Example 3: allow a couple of hosts
  819.  
  820.             hosts allow = lapland, arvidsjaur
  821.  
  822.        Example 4: allow only hosts in netgroup "foonet" or local-
  823.        host, but deny access from one particular host
  824.  
  825.             hosts allow = @foonet, localhost
  826.             hosts deny = pirate
  827.  
  828.        Note  that access still requires suitable user-level pass-
  829.        words.
  830.  
  831.        See testparm(1) for a way of testing your host  access  to
  832.        see if it does what you expect.
  833.  
  834.        Default:
  835.             none (ie., all hosts permitted access)
  836.  
  837.        Example:
  838.             allow hosts = 150.203.5. myhost.mynet.edu.au
  839.  
  840.  
  841.    alternate permissions (S)
  842.        This  option affects the way the "read only" DOS attribute
  843.        is produced for unix files. If this is false then the read
  844.        only  bit  is  set for files on writeable shares which the
  845.        user cannot write to.
  846.  
  847.        If this is true then it is set for files whos  user  write
  848.        bit is not set.
  849.  
  850.        The  latter  behaviour of useful for when users copy files
  851.        from each others directories, and use a file manager  that
  852.        preserves  permissions.  Without  this option they may get
  853.  
  854.  
  855.  
  856. smb.conf                     11/10/94                          13
  857.  
  858.  
  859.  
  860.  
  861.  
  862. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  863.  
  864.  
  865.        annoyed as all copied files will have the "read only"  bit
  866.        set.
  867.  
  868.        Default:      alternate permissions = no
  869.  
  870.        Example:      alternate permissions = yes
  871.  
  872.  
  873.    available (S)
  874.        This  parameter  lets you 'turn off' a service. If 'avail-
  875.        able = no', then ALL attempts to connect  to  the  service
  876.        will fail. Such failures are logged.
  877.  
  878.        Default:
  879.             available = yes
  880.  
  881.        Example:
  882.             available = no
  883.  
  884.    browseable (S)
  885.        This  controls  whether  this share is seen in the list of
  886.        available shares in a net view and in the browse list.
  887.  
  888.        Default:      browseable = Yes
  889.  
  890.        Example:      browseable = No
  891.  
  892.  
  893.    case sig names (G)
  894.        See "case sensitive"
  895.  
  896.  
  897.    comment (S)
  898.        This is a text field that is seen when a client does a net
  899.        view  to  list  what shares are available. It will also be
  900.        used when browsing is fully supported.
  901.  
  902.        Default:      No comment string
  903.  
  904.        Example:      comment = Fred's Files
  905.  
  906.  
  907.    config file (G)
  908.        This allows you  to  override  the  config  file  to  use,
  909.        instead  of  the  default  (usually  smb.conf). There is a
  910.        chicken and egg problem here as this option is set in  the
  911.        config file!
  912.  
  913.        For  this  reason,  if  the  name  of  the config file has
  914.        changed when the parameters are loaded then it will reload
  915.        them from the new config file.
  916.  
  917.        This  option  takes  the usual substitutions, which can be
  918.        very useful.
  919.  
  920.  
  921.  
  922. smb.conf                     11/10/94                          14
  923.  
  924.  
  925.  
  926.  
  927.  
  928. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  929.  
  930.  
  931.        If thew config file doesn't exist then it won't be  loaded
  932.        (allowing  you  to special case the config files of just a
  933.        few clients).
  934.  
  935.        Example:      config file = /usr/local/samba/smb.conf.%m
  936.  
  937.  
  938.    copy (S)
  939.        This parameter allows you to 'clone' service entries.  The
  940.        specified  service  is simply duplicated under the current
  941.        service's name. Any parameters specified  in  the  current
  942.        section will override those in the section being copied.
  943.  
  944.        This feature lets you set up a 'template' service and cre-
  945.        ate similar services easily. Note that the  service  being
  946.        copied  must  occur earlier in the configuration file than
  947.        the service doing the copying.
  948.  
  949.        Default:
  950.             none
  951.  
  952.        Example:
  953.             copy = otherservice
  954.  
  955.    create mask (S)
  956.        A synonym for this parameter is 'create mode'.
  957.  
  958.        This parameter is the octal modes which are used when con-
  959.        verting DOS modes to Unix modes.
  960.  
  961.        Note  that  Samba will or this value with 0700 as you must
  962.        have at least user read, write and execute  for  Samba  to
  963.        work properly.
  964.  
  965.        Default:
  966.             create mask = 0755
  967.  
  968.        Example:
  969.             create mask = 0775
  970.  
  971.    create mode (S)
  972.        See create mask.
  973.  
  974.    dead time (G)
  975.        The  value of the parameter (a decimal integer) represents
  976.        the number of minutes of inactivity before a connection is
  977.        considered dead, and it is disconnected. The deadtime only
  978.        takes effect if the number of open files is zero.
  979.  
  980.        This  is  useful  to  stop  a  server's  resources   being
  981.        exhausted by a large number of inactive connections.
  982.  
  983.        Most clients have an auto-reconnect feature when a connec-
  984.        tion is broken so in most cases this parameter  should  be
  985.  
  986.  
  987.  
  988. smb.conf                     11/10/94                          15
  989.  
  990.  
  991.  
  992.  
  993.  
  994. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  995.  
  996.  
  997.        transparent to users.
  998.  
  999.        Using  this  parameter  with a timeout of a few minutes is
  1000.        recommended for most systems.
  1001.  
  1002.        A deadtime of zero indicates  that  no  auto-disconnection
  1003.        should be performed.
  1004.  
  1005.        Default:
  1006.             dead time = 0
  1007.  
  1008.        Example:
  1009.             dead time = 15
  1010.  
  1011.    debug level (G)
  1012.        The  value  of the parameter (an integer) allows the debug
  1013.        level (logging level) to  be  specified  in  the  smb.conf
  1014.        file.  This is to give greater flexibility in the configu-
  1015.        ration of the system.
  1016.  
  1017.        The default will be the debug level specified on the  com-
  1018.        mand line.
  1019.  
  1020.        Example:
  1021.             debug level = 3
  1022.  
  1023.    default (G)
  1024.        See default service.
  1025.  
  1026.    default case (S)
  1027.        See  the section on "NAME MANGLING" Also note the addition
  1028.        of "short preserve case"
  1029.  
  1030.  
  1031.    default service (G)
  1032.        A synonym for this parameter is 'default'.
  1033.  
  1034.        This parameter specifies the name of a service which  will
  1035.        be  connected  to if the service actually requested cannot
  1036.        be found. Note that the square brackets are NOT  given  in
  1037.        the parameter value (see example below).
  1038.  
  1039.        There  is  no  default  value  for this parameter. If this
  1040.        parameter is not given, attempting to connect to a  nonex-
  1041.        istent service results in an error.
  1042.  
  1043.        Typically the default service would be a public, read-only
  1044.        service.
  1045.  
  1046.        Also not that s of 1.9.14 the apparent service  name  will
  1047.        be changed to equal that of the requested service, this is
  1048.        very useful as it allows you to use macros like %S to make
  1049.        a wildcard service.
  1050.  
  1051.  
  1052.  
  1053.  
  1054. smb.conf                     11/10/94                          16
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  1061.  
  1062.  
  1063.        Note also that any _ characters in the name of the service
  1064.        used in the default service will get mapped to a  /.  This
  1065.        allows for interesting things.
  1066.  
  1067.  
  1068.        Example:
  1069.             default service = pub
  1070.  
  1071.                [pub]
  1072.                     path = /%S
  1073.  
  1074.  
  1075.  
  1076.    deny hosts (S)
  1077.        A synonym for this parameter is 'hosts deny'.
  1078.  
  1079.        The  opposite of 'allow hosts' - hosts listed here are NOT
  1080.        permitted access to services unless the specific  services
  1081.        have their own lists to override this one. Where the lists
  1082.        conflict, the 'allow' list takes precedence.
  1083.  
  1084.        Default:
  1085.             none (ie., no hosts specifically excluded)
  1086.  
  1087.        Example:
  1088.             deny hosts = 150.203.4. badhost.mynet.edu.au
  1089.  
  1090.    dfree command (G)
  1091.        The dfree command setting should only be used  on  systems
  1092.        where a problem occurs with the internal disk space calcu-
  1093.        lations. This has been known to happen  with  Ultrix,  but
  1094.        may  occur  with other operating systems. The symptom that
  1095.        was seen was an error of "Abort Retry Ignore" at  the  end
  1096.        of each directory listing.
  1097.  
  1098.        This  setting  allows the replacement of the internal rou-
  1099.        tines to calculate the total disk space and amount  avail-
  1100.        able  with  an external routine. The example below gives a
  1101.        possible script that might fulfill this function.
  1102.  
  1103.        The external program will be  passed  a  single  parameter
  1104.        indicating  a  directory  in the filesystem being queried.
  1105.        This will typically consist of the string "./". The script
  1106.        should  return  two integers in ascii. The first should be
  1107.        the total disk space in blocks, and the second  should  be
  1108.        the  number  of available blocks. An optional third return
  1109.        value can give the block size in bytes. The default block-
  1110.        size is 1024 bytes.
  1111.  
  1112.        Note:  Your  script  should  NOT  be  setuid or setgid and
  1113.        should be owned by (and writable only by) root!
  1114.  
  1115.        Default:
  1116.             By default internal routines for determining the disk
  1117.  
  1118.  
  1119.  
  1120. smb.conf                     11/10/94                          17
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  1127.  
  1128.  
  1129.        capacity and remaining space will be used.
  1130.  
  1131.        Example:
  1132.             dfree command = /usr/local/smb/dfree
  1133.  
  1134.             Where  the  script  dfree  (which  must  be made exe-
  1135.        cutable) could be
  1136.  
  1137.             #!/bin/sh
  1138.             df $1 | tail -1 | awk '{print $2" "$4}'
  1139.  
  1140.             or perhaps (on Sys V)
  1141.  
  1142.             #!/bin/sh      /usr/bin/df -k $1  |  tail  -1  |  awk
  1143.        '{print $3" "$5}'
  1144.  
  1145.  
  1146.             Note  that  you may have to replace the command names
  1147.        with full path names on some systems.
  1148.  
  1149.    directory (S)
  1150.        See path.
  1151.  
  1152.    dont descend (S)
  1153.        There are certain directories on some  systems  (eg.,  the
  1154.        /proc tree under Linux) that are either not of interest to
  1155.        clients or are infinitely deep (recursive). This parameter
  1156.        allows  you  to specify a comma-delimited list of directo-
  1157.        ries that the server should always show as empty.
  1158.  
  1159.        Note that Samba can be very fussy about the  exact  format
  1160.        of  the  "dont  descend"  entries. For example you ma need
  1161.        "./proc" instead of just "/proc". Experimentation  is  the
  1162.        best policy :-)
  1163.  
  1164.        Default:
  1165.             none (ie., all directories are OK to descend)
  1166.  
  1167.        Example:
  1168.             dont descend = /proc,/dev
  1169.  
  1170.  
  1171.    encrypt passwords (G)
  1172.        This  boolean controls whether encrypted passwords will be
  1173.        negotiated with the cient. Note that this  option  has  no
  1174.        effect  if  you  haven't  compiled  in  the  necessary des
  1175.        libraries and encryption code. It defaults to no.
  1176.  
  1177.  
  1178.    exec (S)
  1179.        This is an alias for preexec
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186. smb.conf                     11/10/94                          18
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  1193.  
  1194.  
  1195.    force group (S)
  1196.        This specifies a group name that all connections  to  this
  1197.        service  should be made as. This may be useful for sharing
  1198.        files.
  1199.  
  1200.        Default:
  1201.               no forced group
  1202.  
  1203.        Example:
  1204.               force group = agroup
  1205.  
  1206.  
  1207.    force user (S)
  1208.        This specifies a user name that all  connections  to  this
  1209.        service  should be made as. This may be useful for sharing
  1210.        files. You should also use it carefully as using it incor-
  1211.        rectly can cause security problems.
  1212.  
  1213.        This  user name only gets used once a connection is estab-
  1214.        lished. Thus clients still need to connect as a valid user
  1215.        and  supply  a  valid  password.  Once connected, all file
  1216.        operations will be performed as  the  "forced  user",  not
  1217.        matter what username the client connected as.
  1218.  
  1219.        Default:
  1220.               no forced user
  1221.  
  1222.        Example:
  1223.               force user = auser
  1224.  
  1225.  
  1226.    guest account (S)
  1227.        This  is  a username which will be used for access to ser-
  1228.        vices which are specified as 'guest ok' (see below). What-
  1229.        ever  privileges  this  user  has will be available to any
  1230.        client connecting to the  guest  service.  Typically  this
  1231.        user  will exist in the password file, but will not have a
  1232.        valid login. If a username is specified in  a  given  ser-
  1233.        vice, the specified username overrides this one.
  1234.  
  1235.        One  some  systems the account "nobody" may not be able to
  1236.        print. Use another account in this case. You  should  test
  1237.        this  by  trying  to log in as your guest user (perhaps by
  1238.        using the "su -" command) and trying to print using lpr.
  1239.  
  1240.        Note that as of version 1.9 of Samba this  option  may  be
  1241.        set differently for each service.
  1242.  
  1243.        Default:
  1244.             specified at compile time
  1245.  
  1246.        Example:
  1247.             guest account = nobody
  1248.  
  1249.  
  1250.  
  1251.  
  1252. smb.conf                     11/10/94                          19
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  1259.  
  1260.  
  1261.    getwd cache (G)
  1262.        This  is  a tuning option. When this is enabled a cacheing
  1263.        algorithm will be  used  to  reduce  the  time  taken  for
  1264.        getwd()  calls. This can have a significant impact on per-
  1265.        formance, especially when widelinks is False.
  1266.  
  1267.        Default:
  1268.             getwd cache = No
  1269.  
  1270.        Example:
  1271.             getwd cache = Yes
  1272.  
  1273.    guest ok (S)
  1274.        See public.
  1275.  
  1276.    guest only (S)
  1277.        If this parameter is 'yes' for a service, then only  guest
  1278.        connections  to  the service are permitted. This parameter
  1279.        will have no affect if "guest ok" or "public" is  not  set
  1280.        for the service.
  1281.  
  1282.        See the section below on user/password validation for more
  1283.        information about this option.
  1284.  
  1285.        Default:
  1286.             guest only = no
  1287.  
  1288.        Example:
  1289.             guest only = yes
  1290.  
  1291.    hide dot files (S)
  1292.        This is a boolean parameter that  controls  whether  files
  1293.        starting with a dot appear as hidden files.
  1294.  
  1295.        Default:      hide dot files = yes
  1296.  
  1297.        Example:      hide dot files = no
  1298.  
  1299.    hosts allow (S)
  1300.        See allow hosts.
  1301.  
  1302.    hosts deny (S)
  1303.        See deny hosts.
  1304.  
  1305.  
  1306.    group (S)
  1307.        This  is  an  alias for "force group" and is only kept for
  1308.        compatability with  old  versions  of  Samba.  It  may  be
  1309.        removed in future versions.
  1310.  
  1311.  
  1312.    hosts equiv (G)
  1313.        If  this  global parameter is a non-null string, it speci-
  1314.        fies the name of a file to read for the names of hosts and
  1315.  
  1316.  
  1317.  
  1318. smb.conf                     11/10/94                          20
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  1325.  
  1326.  
  1327.        users  who  will  be  allowed  access without specifying a
  1328.        password.
  1329.  
  1330.        This is not be confused with allow hosts  which  is  about
  1331.        hosts access to services and is more useful for guest ser-
  1332.        vices.  hosts equiv may be useful  for  NT  clients  which
  1333.        will not supply passwords to samba.
  1334.  
  1335.        NOTE: The use of hosts.equiv can be a major security hole.
  1336.        This is because you are trusting the PC to supply the cor-
  1337.        rect  username.  It  is  very easy to get a PC to supply a
  1338.        false username. I recommend that the hosts.equiv option be
  1339.        only  used  if you really know what you are doing, or per-
  1340.        haps on a home network where you trust your wife and  kids
  1341.        :-)
  1342.  
  1343.        Default      No host equivalences
  1344.  
  1345.        Example      hosts equiv = /etc/hosts.equiv
  1346.  
  1347.  
  1348.    invalid users (S)
  1349.        This  is  a  list  of  users that should not be allowed to
  1350.        login to this service. This is really a  "paranoid"  check
  1351.        to  absolutely  ensure an improper setting does not breach
  1352.        your security.
  1353.  
  1354.        A name starting with @ is interpreted as a unix group.
  1355.  
  1356.        The current servicename is substituted  for  %S.  This  is
  1357.        useful in the [homes] section.
  1358.  
  1359.        See also "valid users"
  1360.  
  1361.        Default      No invalid users
  1362.  
  1363.        Example      invalid users = root fred admin @wheel
  1364.  
  1365.  
  1366.    include (G)
  1367.        This allows you to inlcude one config file inside another.
  1368.        the file is included literally, as though typed in  place.
  1369.  
  1370.        It takes the standard substitutions, except %u, %P and %S
  1371.  
  1372.  
  1373.    keep alive (G)
  1374.        The  value  of  the  parameter (an integer) represents the
  1375.        number of seconds between  'keepalive'  packets.  If  this
  1376.        parameter  is  zero,  no  keepalive  packets will be sent.
  1377.        Keepalive packets, if  sent,  allow  the  server  to  tell
  1378.        whether a client is still present and responding.
  1379.  
  1380.        Keepalives should, in general, not be needed if the socket
  1381.  
  1382.  
  1383.  
  1384. smb.conf                     11/10/94                          21
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  1391.  
  1392.  
  1393.        being used has the SO_KEEPALIVE attribute set on  it  (see
  1394.        "socket  options").  Basically  you  should  only use this
  1395.        option if you strike difficulties.
  1396.  
  1397.        Default:
  1398.             keep alive = 0
  1399.  
  1400.        Example:
  1401.             keep alive = 60
  1402.  
  1403.    load printers (G)
  1404.        A boolean variable that controls whether all  printers  in
  1405.        the printcap will be loaded for browsing by default.
  1406.  
  1407.        Default:      load printers = no
  1408.  
  1409.        Example:      load printers = yes
  1410.  
  1411.  
  1412.    lock directory (G)
  1413.        This options specifies the directory where lock files will
  1414.        be placed.  The lock files are used to implement the  "max
  1415.        connections" option.
  1416.  
  1417.        Default:      lock directory = /tmp/samba
  1418.  
  1419.        Example:      lock directory = /usr/local/samba/locks
  1420.  
  1421.    locking (S)
  1422.        This  controls whether or not locking will be performed by
  1423.        the server in response to lock requests from the client.
  1424.  
  1425.        If "locking = no",  all  lock  and  unlock  requests  will
  1426.        appear  to succeed and all lock queries will indicate that
  1427.        the queried lock is clear.
  1428.  
  1429.        If "locking = yes", real locking will be performed by  the
  1430.        server.
  1431.  
  1432.        This  option  may  be  particularly  useful  for read-only
  1433.        filesystems which do  not  need  locking  (such  as  cdrom
  1434.        drives).
  1435.  
  1436.        Be careful about disabling locking either globally or in a
  1437.        specific service, as lack of locking may  result  in  data
  1438.        corruption.
  1439.  
  1440.        Default:
  1441.             locking = yes
  1442.  
  1443.        Example:
  1444.             locking = no
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450. smb.conf                     11/10/94                          22
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  1457.  
  1458.  
  1459.    log file (G)
  1460.        This  options allows you to override the name of the Samba
  1461.        log file (also known as the debug file).
  1462.  
  1463.        This option takes the standard substitutions, allowing you
  1464.        to have separate log files for each user or machine.
  1465.  
  1466.        Example:      log file = /usr/local/samba/log.%m
  1467.  
  1468.  
  1469.    log level (G)
  1470.        see "debug level"
  1471.  
  1472.  
  1473.    lpq cache time (G)
  1474.        This controls how long lpq info will be cached for to pre-
  1475.        vent the lpq command being called too  often.  A  separate
  1476.        cache  is  kept for each variation of the lpq command used
  1477.        by the system, so if you use different  lpq  commands  for
  1478.        different users then they won't share cache information.
  1479.  
  1480.        The  cache files are stored in /tmp/lpq.xxxx where xxxx is
  1481.        a hash of the lpq command in use.
  1482.  
  1483.        The default is 10 seconds, meaning that the cached results
  1484.        of  a  previous  identical lpq command will be used if the
  1485.        cached data is less than 10 seconds old. A large value may
  1486.        be advisable if your lpq command is very slow.
  1487.  
  1488.        A value of 0 will disable cacheing completely.
  1489.  
  1490.        Default:      lpq cache time = 10
  1491.  
  1492.        Example:      lpq cache time = 30
  1493.  
  1494.  
  1495.    lpq command (S)
  1496.        This parameter specifies the command to be executed on the
  1497.        server host in order to obtain "lpq"-style printer  status
  1498.        information.
  1499.  
  1500.        This  command  should be a program or script which takes a
  1501.        printer name as its only  parameter  and  outputs  printer
  1502.        status information.
  1503.  
  1504.        Currently  four  styles  of printer status information are
  1505.        supported; BSD, SYSV, AIX and HPUX. This covers most  unix
  1506.        systems.  You  control  which  type  is expected using the
  1507.        "printing =" option.
  1508.  
  1509.        Some clients (notably Windows for Workgroups) may not cor-
  1510.        rectly send the connection number for the printer they are
  1511.        requesting status information about. To get  around  this,
  1512.        the  server reports on the first printer service connected
  1513.  
  1514.  
  1515.  
  1516. smb.conf                     11/10/94                          23
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  1523.  
  1524.  
  1525.        to by the client. This only happens if the connection num-
  1526.        ber sent is invalid.
  1527.  
  1528.        If  a  %p  is  given  then  the printername is put in it's
  1529.        place. Otherwise it is placed at the end of the command.
  1530.  
  1531.        Note that it is good practice to include the absolute path
  1532.        in the lpq command as the PATH may not be available to the
  1533.        server.
  1534.  
  1535.        Default:
  1536.                depends on the setting of "printing ="
  1537.  
  1538.        Example:
  1539.             lpq command = /usr/bin/lpq %p
  1540.  
  1541.  
  1542.    lprm command (S)
  1543.        This parameter specifies the command to be executed on the
  1544.        server host in order to delete a print job.
  1545.  
  1546.        This  command  should be a program or script which takes a
  1547.        printer name and job number, and deletes the print job.
  1548.  
  1549.        Currently four styles of printer  control  are  supported;
  1550.        BSD,  SYSV,  AIX  and HPUX. This covers most unix systems.
  1551.        You control which type is expected using the "printing  ="
  1552.        option.
  1553.  
  1554.        If  a  %p  is  given  then  the printername is put in it's
  1555.        place. A %j is replaced with the job number (an  integer).
  1556.  
  1557.        Note that it is good practice to include the absolute path
  1558.        in the lprm command as the PATH may not  be  available  to
  1559.        the server.
  1560.  
  1561.        Default:
  1562.                depends on the setting of "printing ="
  1563.  
  1564.        Example 1:
  1565.             lprm command = /usr/bin/lprm -P%p %j
  1566.  
  1567.        Example 1:
  1568.             lprm command = /usr/bin/cancel %p-%j
  1569.  
  1570.  
  1571.    magic output (S)
  1572.        This  parameter  specifies  the  name of a file which will
  1573.        contain output created by a magic script (see magic script
  1574.        below).
  1575.  
  1576.        Warning:  If  two clients use the same magic script in the
  1577.        same directory  the  output  file  content  is  undefined.
  1578.        Default:
  1579.  
  1580.  
  1581.  
  1582. smb.conf                     11/10/94                          24
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  1589.  
  1590.  
  1591.             magic output = <magic script name>.out
  1592.  
  1593.        Example:
  1594.             magic output = myfile.txt
  1595.  
  1596.    magic script (S)
  1597.        This  parameter  specifies  the  name  of a file which, if
  1598.        opened, will be executed by the server when  the  file  is
  1599.        closed.  This allows a Unix script to be sent to the Samba
  1600.        host and executed on behalf of the connected user.
  1601.  
  1602.        Scripts executed in this way will be deleted upon  comple-
  1603.        tion, permissions permitting.
  1604.  
  1605.        If the script generates output, output will be sent to the
  1606.        file specified by the magic output parameter (see  above).
  1607.  
  1608.        Note that some shells are unable to interpret scripts con-
  1609.        taining carriage-return-linefeed instead  of  linefeed  as
  1610.        the  end-of-line  marker. Magic scripts must be executable
  1611.        "as is" on the host, which for some hosts and some  shells
  1612.        will require filtering at the DOS end.
  1613.  
  1614.        Magic  scripts  are  EXPERIMENTAL and should NOT be relied
  1615.        upon.  Default:
  1616.             None. Magic scripts disabled.
  1617.  
  1618.        Example:
  1619.             magic script = user.csh
  1620.  
  1621.    mangled map (S)
  1622.        This is for those who want to directly map UNIX file names
  1623.        which are not representable on DOS.  The mangling of names
  1624.        is not always what is needed.  In particular you may  have
  1625.        documents with file extensiosn that differ between dos and
  1626.        unix. For example, under unix it is common  to  use  .html
  1627.        for  HTML  files,  whereas under dos .htm is more commonly
  1628.        used.
  1629.  
  1630.        So to map 'html' to 'htm' you put:
  1631.  
  1632.          mangled map = (*.html *.htm)
  1633.  
  1634.        One very useful case is to remove the annoying ;1 off  the
  1635.        ends  of filenames on some CDROMS (only visible under some
  1636.        unixes). To do this use a map of (*;1 *)
  1637.  
  1638.        default:      no mangled map
  1639.  
  1640.        Example:      mangled map = (*;1 *)
  1641.  
  1642.  
  1643.    mangle case (S)
  1644.        See the section on "NAME MANGLING"
  1645.  
  1646.  
  1647.  
  1648. smb.conf                     11/10/94                          25
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  1655.  
  1656.  
  1657.    mangled names (S)
  1658.        This controls whether non-DOS names under Unix  should  be
  1659.        mapped  to DOS-compatible names ("mangled") and made visi-
  1660.        ble, or whether non-DOS names should simply be ignored.
  1661.  
  1662.        See the section on "NAME MANGLING" for details on  how  to
  1663.        control the mangling process.
  1664.  
  1665.        If mangling is used then the mangling algorithm is as fol-
  1666.        lows:
  1667.               - the first (up to)  five  alphanumeric  characters
  1668.               before  the  rightmost dot of the filename are pre-
  1669.               served, forced to upper case,  and  appear  as  the
  1670.               first  (up to) five characters of the mangled name.
  1671.  
  1672.               - a tilde ("~") is appended to the  first  part  of
  1673.               the  mangled  name,  followed  by  a  two-character
  1674.               unique sequence, based on the  origonal  root  name
  1675.               (i.e., the original filename minus its final exten-
  1676.               sion). The final extension is included in the  hash
  1677.               calculation  only  if  it  contains  any upper case
  1678.               characters or is longer than three characters.
  1679.  
  1680.               Note that the character to  use  may  be  specified
  1681.               using the "mangling char" option, if you don't like
  1682.               ~.
  1683.  
  1684.               - the first three alphanumeric  characters  of  the
  1685.               final extension are preserved, forced to upper case
  1686.               and appear as the extension of  the  mangled  name.
  1687.               The  final extension is defined as that part of the
  1688.               original filename after the rightmost dot. If there
  1689.               are  no dots in the filename, the mangled name will
  1690.               have no extension (except in  the  case  of  hidden
  1691.               files - see below).
  1692.  
  1693.               -  files  whose Unix name begins with a dot will be
  1694.               presented as DOS hidden  files.  The  mangled  name
  1695.               will  be  created  as for other filenames, but with
  1696.               the leading dot removed and "___" as its  extension
  1697.               regardless  of  actual  original  extension (that's
  1698.               three underscores).
  1699.  
  1700.        The two-digit hash value consists of upper  case  alphanu-
  1701.        meric characters.
  1702.  
  1703.        This  algorithm can cause name collisions only if files in
  1704.        a directory share the same first five alphanumeric charac-
  1705.        ters. The probability of such a clash is 1/1300.
  1706.  
  1707.        The  name mangling (if enabled) allows a file to be copied
  1708.        between Unix directories from DOS while retaining the long
  1709.        Unix  filename.  Unix files can be renamed to a new exten-
  1710.        sion from DOS and will retain the same basename.   Mangled
  1711.  
  1712.  
  1713.  
  1714. smb.conf                     11/10/94                          26
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  1721.  
  1722.  
  1723.        names do not change between sessions.
  1724.  
  1725.        Default:
  1726.             mangled names = yes
  1727.  
  1728.        Example:
  1729.             mangled names = no
  1730.  
  1731.    mangling char (S)
  1732.        This  controls what character is used as the "magic" char-
  1733.        acter in name mangling. The default is a ~  but  this  may
  1734.        interfere with some software. Use this option to set it to
  1735.        whatever you prefer.
  1736.  
  1737.        Default:
  1738.             mangling char = ~
  1739.  
  1740.        Example:
  1741.             mangling char = ^
  1742.  
  1743.  
  1744.    max log file (G)
  1745.        This option (an integer in kilobytes)  specifies  the  max
  1746.        size  the  log  file  should  grow  to. Samba periodically
  1747.        checks the size and if it is exceeded it will  rename  the
  1748.        file, adding a .old extension.
  1749.  
  1750.        A size of 0 means no limit.
  1751.  
  1752.        Default:      max log size = 5000
  1753.  
  1754.        Example:
  1755.             max log size = 1000
  1756.  
  1757.  
  1758.    max xmit (G)
  1759.        This  option controls the maximum packet size that will be
  1760.        negotiated by Samba. The default is 65535,  which  is  the
  1761.        maximum. In some cases you may find you get better perfor-
  1762.        mance with a smaller value. A value below 2048  is  likely
  1763.        to cause problems.
  1764.  
  1765.        Default:      max xmit = 65535
  1766.  
  1767.        Example:
  1768.             max xmit = 8192
  1769.  
  1770.  
  1771.    mangled stack (G)
  1772.        This  parameter  controls the number of mangled names that
  1773.        should be cached in the Samba server.
  1774.  
  1775.        This stack is  a  list  of  recently  mangled  base  names
  1776.        (extensions  are only maintained if they are longer than 3
  1777.  
  1778.  
  1779.  
  1780. smb.conf                     11/10/94                          27
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  1787.  
  1788.  
  1789.        characters or contains upper case characters).
  1790.  
  1791.        The larger this value, the more likely it is that  mangled
  1792.        names  can  be successfully converted to correct long Unix
  1793.        names. However, large stack sizes will slow most directory
  1794.        access.  Smaller  stacks  save  memory in the server (each
  1795.        stack element costs 256 bytes).
  1796.  
  1797.        It is not possible to absolutely  guarantee  correct  long
  1798.        file names, so be prepared for some surprises!
  1799.  
  1800.        Default:
  1801.             mangled stack = 50
  1802.  
  1803.        Example:
  1804.             mangled stack = 100
  1805.  
  1806.  
  1807.    map archive (S)
  1808.        This  controls whether the DOS archive attribute should be
  1809.        mapped to Unix execute bits.  The DOS archive bit  is  set
  1810.        when  a file has been modified since its last backup.  One
  1811.        motivation for this option it to keep Samba/your  PC  from
  1812.        making  any file it touches from becoming executable under
  1813.        UNIX.  This can be quite annoying for shared source  code,
  1814.        documents,  etc...
  1815.  
  1816.        Default:
  1817.              map archive = yes
  1818.  
  1819.        Example:
  1820.              map archive = no
  1821.  
  1822.  
  1823.    map hidden (S)
  1824.        This  controls  whether  DOS  style hidden files should be
  1825.        mapped to Unix execute bits.
  1826.  
  1827.        Default:
  1828.             map hidden = no
  1829.  
  1830.        Example:
  1831.             map hidden = yes
  1832.  
  1833.    map system (S)
  1834.        This controls whether DOS style  system  files  should  be
  1835.        mapped to Unix execute bits.
  1836.  
  1837.        Default:
  1838.             map system = no
  1839.  
  1840.        Example:
  1841.             map system = yes
  1842.  
  1843.  
  1844.  
  1845.  
  1846. smb.conf                     11/10/94                          28
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  1853.  
  1854.  
  1855.    max connections (S)
  1856.        This  option allows the number of simultaneous connections
  1857.        to a service  to  be  limited.  If  "max  connections"  is
  1858.        greater  than  0  then connections will be refused if this
  1859.        number of connections to the service are already  open.  A
  1860.        value  of zero mean an unlimited number of connections may
  1861.        be made.
  1862.  
  1863.        Record lock files are used to implement this feature.  The
  1864.        lock  files  will  be stored in the directory specified by
  1865.        the "lock directory" option.
  1866.  
  1867.        Default:      max connections = 0
  1868.  
  1869.        Example:      max connections = 10
  1870.  
  1871.    only user (S)
  1872.        This is a boolean option that controls whether connections
  1873.        with  usernames  not in the user= list will be allowed. By
  1874.        default this option is disabled so a client can  supply  a
  1875.        username to be used by the server.
  1876.  
  1877.        Note  that this also means Samba won't try to deduce user-
  1878.        names from the service name. This can be annoying for  the
  1879.        [homes]  section. To get around this you could use "user =
  1880.        %S" which means your "user" list will be just the  service
  1881.        name,  which for home directories is the name of the user.
  1882.  
  1883.        Default:      only user = False
  1884.  
  1885.        Example:      only user = True
  1886.  
  1887.  
  1888.    message command (G)
  1889.        This  specifies  what  command  to  run  when  the  server
  1890.        receives a WinPopup style message.
  1891.  
  1892.        This  would  normally  be a command that would deliver the
  1893.        message somehow. How this is to be  done  is  up  to  your
  1894.        imagination.
  1895.  
  1896.        What I use is:
  1897.  
  1898.           message command = csh -c 'xedit %s;rm %s' &
  1899.  
  1900.        This  delivers  the  message  using xedit, then removes it
  1901.        afterwards. NOTE THAT IT IS VERY IMPORTANT THAT THIS  COM-
  1902.        MAND  RETURN  IMMEDIATELY.  That's why I have the & on the
  1903.        end. If it doesn't return immediately then  your  PCs  may
  1904.        freeze  when  sending  messages (they should recover after
  1905.        30secs, hopefully).
  1906.  
  1907.        All messages are delivered as the global guest  user.  The
  1908.        command  takes  the  standard  substitutions,  although %u
  1909.  
  1910.  
  1911.  
  1912. smb.conf                     11/10/94                          29
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  1919.  
  1920.  
  1921.        won't work (%U may be better in this case).
  1922.  
  1923.        Apart from the  standard  substitutions,  some  additional
  1924.        ones apply. In particular:
  1925.  
  1926.        %s = the filename containing the message
  1927.  
  1928.        %t  = the destination that the message was sent to (proba-
  1929.        bly the server name)
  1930.  
  1931.        %f = who the message is from
  1932.  
  1933.        You could make this command send mail,  or  whatever  else
  1934.        takes  your fancy. Please let me know of any really inter-
  1935.        esting ideas you have.
  1936.  
  1937.        Here's a way of sending the messages as mail to root:
  1938.  
  1939.        message command = /bin/mail -s 'message  from  %f  on  %m'
  1940.        root < %s; rm %s
  1941.  
  1942.        If you don't have a message command then the message won't
  1943.        be delivered and Samba will tell the sender there  was  an
  1944.        error.  Unfortunately  WfWg totally ignores the error code
  1945.        and carries on regardless, saying  that  the  message  was
  1946.        delivered.
  1947.  
  1948.        If  you  want to silently delete it then try "message com-
  1949.        mand = rm %s".
  1950.  
  1951.        For the really adventurous, try something like this:
  1952.  
  1953.        message   command   =   csh    -c    'csh    <    %s    |&
  1954.        /usr/local/samba/smbclient                   -M %m; rm %s'
  1955.        &
  1956.  
  1957.        this would execute the command as a script on the  server,
  1958.        then give them the result in a WinPopup message. Note that
  1959.        this could cause a loop if you send  a  message  from  the
  1960.        server  using  smbclient!  You  better wrap the above in a
  1961.        script that checks for this :-)
  1962.  
  1963.        Default:      no message command
  1964.  
  1965.        Example:
  1966.                message command = csh -c 'xedit %s;rm %s' &
  1967.  
  1968.  
  1969.    min print space (S)
  1970.        This sets the minimum amount of free disk space that  must
  1971.        be  available  before a user will be able to spool a print
  1972.        job. It is specified in kilobytes. The default is 0, which
  1973.        means no limit.
  1974.  
  1975.  
  1976.  
  1977.  
  1978. smb.conf                     11/10/94                          30
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  1985.  
  1986.  
  1987.        Default:      min print space = 0
  1988.  
  1989.        Example:      min print space = 2000
  1990.  
  1991.  
  1992.    null passwords (G)
  1993.        Allow  or disallow access to accounts that have null pass-
  1994.        words.
  1995.  
  1996.        Default:      null passwords = no
  1997.  
  1998.        Example:      null passwords = yes
  1999.  
  2000.  
  2001.    os level (G)
  2002.        This integer value controls what  level  Samba  advertises
  2003.        itself  as  for  browse  elections.  See  BROWSING.txt for
  2004.        details.
  2005.  
  2006.  
  2007.    packet size (G)
  2008.        The maximum transmit packet size during a raw  read.  This
  2009.        option  is no longer implemented as of version 1.7.00, and
  2010.        is kept only so old  configuration  files  do  not  become
  2011.        invalid.
  2012.  
  2013.  
  2014.    passwd chat (G)
  2015.        This  string  coontrols the "chat" conversation that takes
  2016.        places between smbd and the local password  changing  pro-
  2017.        gram  to change the users password. The string describes a
  2018.        sequence of  response-receive  pairs  that  smbd  uses  to
  2019.        determine  what  to send to the passwd program and what to
  2020.        expect back. If the expected output is not  received  then
  2021.        the password is not changed.
  2022.  
  2023.        This  chat sequence is often quite site specific, deppend-
  2024.        ing on what local methods are used  for  password  control
  2025.        (such as NIS+ etc).
  2026.  
  2027.        The string can contain the macros %o and %n which are sub-
  2028.        stituted for the old and new  passwords  respectively.  It
  2029.        can  aso  contain  the  standard macros \n \r \t and \s to
  2030.        give line-feed, carriage-return, tab and space.
  2031.  
  2032.        The string can also contain a * which matches any sequence
  2033.        of characters.
  2034.  
  2035.        Double  quotes  can be used to collect strings with spaces
  2036.        in them into a single string.
  2037.  
  2038.        If the send string in any part of the chat sequence  is  a
  2039.        fullstop  "."   then  no string is sent. Similarly, is the
  2040.        expect string is a fullstop then no string is expected.
  2041.  
  2042.  
  2043.  
  2044. smb.conf                     11/10/94                          31
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  2051.  
  2052.  
  2053.        Example:      passwd chat = "*Enter  OLD  password*"  %o\n
  2054.        "*Enter NEW password*" %n\n \
  2055.                              "*Reenter    NEW   password*"   %n\n
  2056.        "*Password changed*"
  2057.  
  2058.        Default:        passwd   chat   =   *old*password*    %o\n
  2059.        *new*password* %n\n *new*password* %n\n *changed*
  2060.  
  2061.  
  2062.    passwd program (G)
  2063.        The  name  of a program that can be used to set user pass-
  2064.        words.
  2065.  
  2066.        This is only necessary if you have enabled remote password
  2067.        changing  at  compile  time.  Any occurances of %u will be
  2068.        replaced with the user name.
  2069.  
  2070.        Also note that many passwd programs insist in "reasonable"
  2071.        passwords,  such  as a minimum length, or the inclusion of
  2072.        mixed case chars and digits. This can pose  a  problem  as
  2073.        some  clients  (such  as Windows for Workgroups) uppercase
  2074.        the password before sending it.
  2075.  
  2076.        Default:      passwd program = /bin/passwd
  2077.  
  2078.        Example:      passwd program = /sbin/passwd %u
  2079.  
  2080.  
  2081.    password level (G)
  2082.        Some  client/server  conbinations  have  difficulty   with
  2083.        mixed-case passwords.  One offending client is Windows for
  2084.        Workgroups, which for  some  reason  forces  passwords  to
  2085.        upper  case  when  using  the LANMAN1 protocol, but leaves
  2086.        them alone when using COREPLUS!
  2087.  
  2088.        This parameter defines the maximum  number  of  characters
  2089.        that may be upper case in passwords.
  2090.  
  2091.        For  example,  say the password given was "FRED". If pass-
  2092.        word level is set to 1 (one), the  following  combinations
  2093.        would  be  tried if "FRED" failed: "Fred", "fred", "fRed",
  2094.        "frEd", "freD". If password level was set to 2 (two),  the
  2095.        following   combinations  would  also  be  tried:  "FRed",
  2096.        "FrEd", "FreD", "fREd", "fReD", "frED". And so on.
  2097.  
  2098.        The higher value this parameter is set to the more  likely
  2099.        it is that a mixed case password will be matched against a
  2100.        single case password. However, you should  be  aware  that
  2101.        use  of  this parameter reduces security and increases the
  2102.        time taken to process a new connection.
  2103.  
  2104.        A value of zero will cause only two attempts to be made  -
  2105.        the password as is and the password in all-lower case.
  2106.  
  2107.  
  2108.  
  2109.  
  2110. smb.conf                     11/10/94                          32
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  2117.  
  2118.  
  2119.        If  you find the connections are taking too long with this
  2120.        option then you probably  have  a  slow  crypt()  routine.
  2121.        Samba  now  comes  with  a  fast  "ufc crypt" that you can
  2122.        select in the Makefile. You  should  also  make  sure  the
  2123.        PASSWORD_LENGTH  option  is  correct  for  your  system in
  2124.        local.h and includes.h. On most systems only the  first  8
  2125.        chars  of  a  password  are significant so PASSWORD_LENGTH
  2126.        should be 8, but on some longer passwords are significant.
  2127.        The  inlcudes.h  file tries to select the right length for
  2128.        your system.
  2129.  
  2130.        Default:
  2131.             password level = 0
  2132.  
  2133.        Example:
  2134.             password level = 4
  2135.  
  2136.  
  2137.    password server (G)
  2138.        By specifying the name of another SMB server  (such  as  a
  2139.        WinNT box) with this option, and using "security = server"
  2140.        you can get Samba to do all it's username/password valida-
  2141.        tion via a remote server.
  2142.  
  2143.        This  options sets the name of the password server to use.
  2144.        It must be a netbios name, so if the machines netbios name
  2145.        is  different from it's internet name then you may have to
  2146.        add it's netbios name to /etc/hosts.
  2147.  
  2148.        The password server much be a machine capable of using the
  2149.        "LM1.2X002"  or  the "LM NT 0.12" protocol, and it must be
  2150.        in user level security mode.
  2151.  
  2152.        NOTE: Using a password server means your unix box (running
  2153.        Samba)  is  only as secure as your password server. DO NOT
  2154.        CHOOSE A PASSWORD SERVER THAT YOU DON'T COMPLETELY  TRUST.
  2155.  
  2156.        Never point a Samba server at itself for password serving.
  2157.        This will cause a  loop  and  could  lock  up  your  Samba
  2158.        server!
  2159.  
  2160.        The name of the password server takes the standard substi-
  2161.        tutions, but probably the only useful  one  is  %m,  which
  2162.        means the Samba server will use the incoming client as the
  2163.        password server. If you use this  then  you  better  trust
  2164.        your  clients,  and  you  better  restrict them with hosts
  2165.        allow!
  2166.  
  2167.        If you list several hosts in the "password server"  option
  2168.        then  smbd  will  try  each in turn till it finds one that
  2169.        responds. This is useful in case your primary server  goes
  2170.        down.
  2171.  
  2172.  
  2173.  
  2174.  
  2175.  
  2176. smb.conf                     11/10/94                          33
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182. SMB.CONF(5)                  smb.conf                 SMB.CONF(5)
  2183.  
  2184.  
  2185.    path (S)
  2186.        A synonym for this parameter is 'directory'.
  2187.  
  2188.        This  parameter specifies a directory to which the user of
  2189.        t