


ATTACH.CONF(5)            FILE FORMATS             ATTACH.CONF(5)



NAME
     attach.conf - attach configuration file

DESCRIPTION
     The behavior of _A_t_t_a_c_h,_d_e_t_a_c_h, and _n_f_s_i_d are  controlled  by
     attach.conf.  These programs read /etc/attach.conf when they
     start up, so the system administrator  can  customize  their
     behavior without needing to recompile the programs.

     The format of attach.conf is line oriented, with one  confi-
     guration option per line.  Blank lines and lines which begin
     with a pound sign (#) are ignored as comments.   The  confi-
     guration keyword is the first whitespace-delimited string on
     the line, with its arguments following it, also delimited by
     whitespace.

     There are several different types of keywords, which  deter-
     mine what type of argument or arguments they require.

     boolean
          Keywords of type boolean are  typically  options  which
          can be enabled or disabled, as specified by their argu-
          ments.  Legal arguments are _o_n or _o_f_f.

     string
          Keywords of type string are typically  filenames.   Any
          argument is legal; the configuration option is assigned
          the first argument following the keyword.

     user-list
          Keywords of type user-list take one or more  arguments,
          which  may either be a number representing a user-id or
          a username.

     regexp-argument
          Keywords of type regexp-argument take the  first  argu-
          ment  as  a  regular  expression.  The remainder of the
          line is kept as a string which applies if  the  regular
          expression  matches  the  filesystem  being attached or
          detached.

     regexp-list
          Keywords of type regexp-list take oneor more arguments,
          which are regular expressions.

     The following keywords are supported in attach.conf:

     verbose (type boolean) (default: on)
          If this option is on, then messages indicating  success
          or  failure  are printed as each filesystem is attached
          or detached.  If this option is off,  only  error  mes-
          sages are printed.



Sun Release 4.1     Last change: July 4, 1989                   1






ATTACH.CONF(5)            FILE FORMATS             ATTACH.CONF(5)



     debug (type boolean) (default: off)
          If this option is on, then  various  debuging  messages
          are printed as the attach or detach operation proceeds.
          This is normally only of interest to attach developers.

     ownercheck (type boolean) (default: off)
          If this option is on, then only the user which attached
          a filesystem may detach it. _T_r_u_s_t_e_d _u_s_e_r_s (as specified
          by the trusted keyword) may use the -override (-O) flag
          to  forcibly  detach  a  filesystem attached by another
          user.

     keep-mount (type boolean) (default: off)
          If this option is on,  then  when  a  user  attaches  a
          filesystem  which  is  already mounted but not in atta-
          chtab a flag is set so that  when  that  filesystem  is
          detached,  its  entry is removed from attachtab without
          unmounting it.  This is useful to  prevent  users  from
          being  able to forcibly unmount partitions by attaching
          them and then detaching them.

     nfs-root-hack (type boolean) (default: on)
          This option affects the  construction  of  the  default
          mount  point  for  explicit  NFS attaches.  The default
          mount point is constructed by appending  the  value  of
          _n_f_s-_m_o_u_n_t-_d_i_r  followed  by  the  hostname  of  the NFS
          server, followed by the remotely mounted directory.  If
          _n_f_s-_r_o_o_t-_h_a_c_k  is  on,  then  if  the  remotely mounted
          directory is the root (/), it is replaced by  ``/root''
          for  the  purposes  of  contructing  the  default mount
          point.

     nfs-mount-dir (type string) (default: /)
          This option affects the  construction  of  the  default
          mount   point  for  explicit  NFS  attaches.   See  the
          description for _n_f_s-_r_o_o_t-_h_a_c_k above.

     attachtab (type string) (default: /usr/tmp/attachtab)
          This option specifies the location of the  _a_t_t_a_c_h_t_a_b(_5)
          file.   It  is  generally located in /usr/tmp, /etc, or
          /site/etc.

     mtab (type string) (default: /etc/mtab)
          This option specifies the location of the _m_t_a_b(_5) file.
          Since  other  programs,  such as mount(8) and umount(8)
          expect mtab to be in /etc, it  is  probably  unwise  to
          change the location of this file.

     aklog (type string)
          (default: /afs/athena/mit/andrew/@sys/aklog)

          This keyword specifies the  location  of  the  _a_k_l_o_g  -



Sun Release 4.1     Last change: July 4, 1989                   2






ATTACH.CONF(5)            FILE FORMATS             ATTACH.CONF(5)



          program.   It  is  used to authenticate the user to the
          AFS system.

     fsck (type string) (default: /etc/fsck)
          This option specifies the location of _f_s_c_k(_8), which is
          used  to  check the integrity of a Unix filesystem.  It
          is used when UFS or RVD filesystems are attached.

     trusted (type user-list) (default: root)
          This option allows the system administrator to  specify
          a  list of trusted users who are allowed to use certain
          restricted options found in  _a_t_t_a_c_h(_1)  and  _d_e_t_a_c_h(_1).
          This  includes the ability to detach a filesystem owned
          by another user (if  ownercheck  is  enabled)  and  the
          ability to force a filesystem to be mounted without the
          nosuid mount option.

     nosetuid or nosuid (type regexp-list)
          Filesystems which match the regular  expresions  listed
          as  arguments  are  mounted with the nosuid flag.  This
          instructs the operating  system  to  disregard  set-uid
          flags  found  on files in the mounted filesystem.  (See
          mount(8) for more information.)

     setuid or suid (type regexp-list)
          Filesystems which match the regular  expresions  listed
          as arguments are mounted without the nosuid flag.

     allow (type regexp-list)
          Filesystems which match the regular  expresions  listed
          as arguments may be mounted with attach.

     noallow (type regexp-list)
          Filesystems which match the regular  expresions  listed
          as  arguments  may  not  be  mounted with attach.  This
          prohibition can be bypassed  with  the  -override  (-O)
          flag, if the user is one of the ``trusted users.''

     mountpoint (type regexp-list)
          Mountpoint which match one of the  regular  expressions
          listed as arguments are allowed.

     nomountpoint (type regexp-list)
          Mountpoint which match one of the  regular  expressions
          listed as arguments are not allowed.   This prohibition
          can be bypassed with the -override (-O)  flag,  if  the
          user is one of the ``trusted users.''

     filesystem (type string-argument)
          This keyword allows the system administrator to give  a
          filesystem definition for a filesystem.  Definitions in
          attach.conf    take    precedence    over     Hesiod(3)



Sun Release 4.1     Last change: July 4, 1989                   3






ATTACH.CONF(5)            FILE FORMATS             ATTACH.CONF(5)



          definitions..

     options (type regexp-argument)
          Filesystems which match the regular  expresions  listed
          as arguments are mounted with the specified argument as
          a mount option.  This is particularly useful in forcing
          the  NFS  packet size to something which can be handled
          by local gateways.  This can be done including the fol-
          lowing line in attach.conf:

          options {nfs}:.*    rsize=1024,wsize=1024

FILESYSTEM DEFINITIONS
     Filesystem definitions are used by attach to determine how a
     named  filesystem should be attached.  These definitions can
     be found either in attach.conf or  by  performing  Hesiod(3)
     lookup.  In general, the definition consists of a filesystem
     type (NFS, RVD, UFS, etc.) followed by information  specific
     to  that  fileststem type.  Here are some typical filesystem
     definitions, as would be found in  attach.conf  (in  Hesiod,
     the  first  two  fields  would  be absent and the definition
     would be keyed to a filesystem name):

     filesystem thor:site     UFS /dev/ra0g w /site
     filesystem priam:slush   NFS /slush priam w /priam/slush
     filesystem tytso-afs     AFS /afs/athena/mit/tytso w /mit/tytso-afs
     filesystem bldge40test-vsusr-63A   AFS /afs/testers/@sys/urvd r /urvd
     filesystem bldgw20-vsusr-62A filsys     RVD vsusr slartibartfast r /urvd
     filesystem games    ERR Sorry, the games filesystem is not available

     The following are the supported  filesystem  types  and  the
     format a filesystem definition for that type:

     NFS

     RVD

     UFS

     AFS

     ERR

EXTENSIONS TO REGEULAR EXPRESIONS
     Regular expressions in an attach.conf file can  be  prefixed
     by  a  _t_y_p_e-_d_e_l_i_m_i_t_e_r, an optional string delimited by curly
     braces and followed a colon.  If this string is present,  it
     consists  of a list of filesystem types separated by commas.
     The regular expression is  matched  against  the  filesystem
     only  if  the  filesystem type matches one of the filesystem
     types listed in the _t_y_p_e-_d_e_l_i_m_i_t_e_r.  The _t_y_p_e-_d_e_l_i_m_i_t_e_r  may
     be  prefixed  by  a  caret  (^),  which  reverses  the _t_y_p_e-



Sun Release 4.1     Last change: July 4, 1989                   4






ATTACH.CONF(5)            FILE FORMATS             ATTACH.CONF(5)



     _d_e_l_i_m_i_t_e_r check.  That is, the regular  expression  is  con-
     sidered only if the filesystem type is _n_o_t one listed in the
     _t_y_p_e-_d_e_l_i_m_i_t_e_r.  The _t_y_p_e-_d_e_l_i_m_i_t_e_r may be  further  option-
     ally  prefixed with either a plus (+) or minus (-) sign.  If
     present, the plus sign indicates that the regular expression
     should  be  considered only if the filesystem was explicitly
     definied on the command  line.   Likewise,  the  minus  sign
     indicates  that  the regular expression should be considered
     only if the filesystem was not explicitly definied.

BUGS
FILES
     /etc/attach.conf

SEE ALSO
     attach(1), attachtab(5)







































Sun Release 4.1     Last change: July 4, 1989                   5



