uss bulk                   AFS Commands                uss bulk


NAME

   uss bulk -- execute multiple uss commands.


   uss bulk  -file <bulk input file>  [-template <pathname of
   template file>]
   [-verbose]  [-cell <cell name>]
   [-admin <administrator to authenticate>]  [-dryrun]
   [-overwrite]
   [-help]

   uss b  -f <bulk input file>  [-t <pathname of template
   file>] [-v]  [-c <cell name>]
   [-a <administrator to authenticate>]  [-d]  [-o]  [-h]

DESCRIPTION

   Executes  the  uss commands listed in bulk input file, which
   must already exist.  If bulk input file has add commands  in
   it  that  create  complete (rather than authentication-only)
   accounts, then the issuer must also specify a template using
   pathname of template file.

WARNING

   The  following warning applies when all of the following are
   true:

      - this command is issued on machines running Ultrix

      - the bulk file contains add lines

      - the template file used for the  account  creations
        is not 0-length.

   In this set of circumstances, the issuer must use the -admin
   argument to adopt a privileged AFS identity while  remaining
   "root"  in  the  local  machine's  UNIX file system.  Ultrix
   allows only "root" to issue the /etc/chown command that  the
   add   command   invokes  to  set  the  owner  of  files  and
   directories created by template lines.  At  the  same  time,
   AFS  allows only a privileged administrator to issue the AFS
   commands invoked; "root" is not normally  a  privileged  AFS
   administrator.

   Other  operating  systems  allow  users other than "root" to
   issue /etc/chown, but users may still find it convenient  to
   adopt different identities in the AFS and UNIX file systems.
   Being authenticated in AFS as a privileged user is  required
   under all operating systems.

ARGUMENTS

   -file     names  the  file  containing  the  uss commands to
             execute.    If  the  issuer  does  not  provide  a
             pathname, the command interpreter assumes the file
             is in the working directory.  The BULK FILE FORMAT
             section  details  the  proper  format  for command
             lines in the bulk file.

   -template names the template file for any add commands  that



             appear in the bulk input file.  If the issuer does
             not provide a pathname,  the  command  interpreter
             assumes  the  template  file  is  in  the  working
             directory.  See  the  AFS  System  Administrator's
             Guide for a definition of template format.

   -verbose  causes  the  command  interpreter  to  produce (on
             stdout) a more detailed trace of the actions it is
             executing.    By  default, only warnings and error
             messages appear.

   -cell     specifies the cell in which to  run  the  command.
             See  section  7.1 in the Reference Manual for more
             details.  -admin
             names  the  user  whom  the Authentication Servers
             should authenticate for purposes  of  creating  an
             Authentication Database entry.  See section 7.1 in
             the Reference Manual for more details.  Note: When
             the  bulk  file contains add lines, issuers of the
             uss bulk command on machines running  Ultrix  must
             use  this argument in order to adopt an privileged
             AFS identity while remaining "root" in  the  local
             machine's  UNIX  file  system.   See the preceding
             WARNING.

   -dryrun   indicates that the command interpreter should  not
             actually  execute  the  command, but should report
             all the actions it would perform if executing  it.
             See  section  7.1 in the Reference Manual for more
             details.

   -overwrite
             instructs  the command interpreter (when add lines
             appear  in  the  bulk  file)  to   overwrite   any
             directories,  files  and  links  that exist in the
             file system related to the user for which it  also
             finds  definitions  on template "D", "E", "F", "L"
             and "S" lines.   If  this  flag  is  omitted,  the
             command  interpreter  prompts,  once  for each add
             line in the bulk file, for confirmation  that  the
             issuer  really  wants to overwrite those elements.
             This flag should not be used if the bulk file does
             not contain add lines.

   -help     prints  the  online help for this command.  Do not
             provide any other arguments  or  flags  with  this
             one.   See section 7.1 in the Reference Manual for
             more details.

BULK FILE FORMAT

   Five types of command lines can appear  in  the  bulk  file:
   add,  delete, exec, savevolume, and delvolume.  Each command
   line should have a carriage return only  at  the  end,  even
   though it may cover several lines on the screen.



   The add line

   Each  add line is the equivalent of a uss add command issued
   on the command line.  Begin the line with  "add"  only,  not
   "uss add",  and provide the arguments in the same order they
   would appear on the uss add command  line,  separating  each
   with a colon.  Only the first argument, corresponding to the
   command line argument -user, is required.  To omit  a  value
   for  an  argument  (presumably because it is optional or the
   template specifies a constant value for  it),  type  nothing
   between  two  colons.  After the last argument provided, end
   the line with either a  colon  and  carriage  return,  or  a
   carriage return alone.

   The  eighth  through  seventeenth  fields  are for assigning
   values to the number variables, with the  fields  listed  in
   increasing numerical order.  The issuer must indicate either
   a value or an empty field (nothing between two  colons)  for
   every  variable that precedes the last one being assigned an
   actual value.  It  is  acceptable,  but  not  necessary,  to
   indicate empty fields for any number variables following the
   last one actually assigned a value.

   The  following  concrete  representation   uses   the   same
   identifiers for arguments as the uss add definition.  The "{
   }" notation indicates that each entry between vertical  bars
   is  one  possible choice.  Remember that an instruction like
   this would appear on a single line in the actual bulk file.

      add <login name>[:<full name>][:<initial passwd>][:<file 
      [:<file server's disk partition for home volume>][:<home 
      [:<uid to assign the user>][:{<var1> | :<var1>:<var2> | :
           . . . . et cetera through.  . . .
      | :<var1>:<var2>:<var3>:<var4>:<var5>:<var6>:<var7>:<var8

   Do not surround full name with double  quotes  in  the  bulk
   file,  even  though  its  counterpart on the regular uss add
   command line must be so surrounded.

   The EXAMPLES section below may help to clarify the format of
   the add line.

   The delete line

   Each  delete  line is the equivalent of a uss delete command
   issued on the command line.  Begin the  line  with  "delete"
   only,  not  "uss delete",  and  provide the arguments in the
   same order they would appear on the uss delete command line,
   separating  each  with a colon.  Provide values for at least
   the  first  two  arguments  (corresponding  to   -user   and
   -mountpoint   on  the  command  line).    The  third  field,
   corresponding to -savevolume, is optional; there  are  three
   possible values:

      - if  the  word  savevolume  appears, the volume and
        VLDB entry will not be removed

      - if the word delvolume appears, the volume and VLDB
        entry will be removed

      - if  the  field  is  blank, then the volume will be



        treated according to the prevailing  default  (see
        the  following  description  of the savevolume and
        delvolume lines to learn how to set the default).

   After the last argument provided, end the line with either a
   colon and carriage return or a carriage return alone.

   The   following   concrete   representation  uses  the  same
   identifiers for arguments as does the uss delete definition.
   The  "{    }"  notation  indicates that each entry between a
   vertical line is one possible  choice.    Remember  that  an
   instruction  like  this would appear on a single line in the
   actual bulk file.  The EXAMPLES section illustrates  use  of
   this line.

      delete <account name>:<full mount point pathname>
             [:{savevolume | delvolume |  }]

   The exec line

   This  line  causes  the  indicated  UNIX shell command to be
   executed.  Its format is

      exec <command string to execute>

   The savevolume and delvolume lines

   The savevolume and delvolume lines set the default treatment
   of  volumes  in  delete  lines  that follow them in the bulk
   file.  The savevolume line prevents the  removal  of  volume
   and  VLDB  entry  for  all  subsequent  delete  lines.   The
   delvolume line causes the removal of volume and  VLDB  entry
   for  all  subsequent delete lines.  The default treatment if
   neither line appears in a bulk file is to remove the  volume
   and   VLDB;  delete  lines  that  appear  before  the  first
   savevolume line are also treated this way.

   An explicit savevolume or delvolume instruction in the third
   field  of an individual delete line overrides the default in
   effect at the time.  If nothing appears in the third  field,
   the default is obeyed.

   Neither  command  takes  arguments  (the  word savevolume or
   delvolume should appear by itself on the line).  The  effect
   of  either  line  lasts  until  the end of the bulk file, or
   until its opposite appears in the file.  Multiple  instances
   of each command can be used to toggle back and forth between
   removal and non-removal of volumes.

EXAMPLES

   The following shows the proper format for an add line in the
   bulk  file  when  only  the  first  (required)  argument  is
   provided, and when the first three arguments  are  provided.
   In the first case, the user's "real name" is set to anderson
   and password to changeme (the defaults).

      add anderson
      add smith:John Smith:js_pswd

   The following add line example supposes  that  the  Transarc



   Corporation cell uses a template with the following "V" line
   in it:

   V user.$USER $SERVER.transarc.com /vicep$PART 2000
          /afs/transarc.com/usr/$3/$USER $UID $USER all

   To create an account for users John Smith from the Marketing
   Department  and  Pat  Jones from the Finance Department, the
   appropriate add commands in the bulk file might be:

      add smith:John Smith::fs1:a:::::marketing
      add jones:Pat Jones::fs3:c:::::finance

   The effect would be to establish an account called smith  in
   the Protection and Authentication Databases, with an initial
   password changeme and a  value  for  $UID  provided  by  the
   Protection  Server.  His volume, user.smith, would reside on
   partition    "/vicepa"    of     file     server     machine
   "fs1.transarc.com"     and     would     be    mounted    at
   /afs/transarc.com/usr/marketing/smith.   He  would  own  his
   home  directory and have full access to it.  The account for
   jones would be similar,  except  that  it  would  reside  on
   partition     "/vicepc"     of     file    server    machine
   "fs3.transarc.com"    and    would     be     mounted     at
   /afs/transarc.com/usr/finance/jones.

   Notice  that  the  fields  corresponding  to <home directory
   mount point>, <uid to assign the user>,  <var1>  and  <var2>
   are  empty  (between  a  and  marketing on the first example
   line) since their corresponding variables do not  appear  in
   the  template  file.    The  <initial  passwd> field is also
   empty.

   The issuer could, if he or she choose, specify  values/empty
   fields  for  all  nine  number variables.  In this case, the
   bulk file lines shown above would look like:

      add smith:John Smith::fs1:a:::::marketing::::::
      add jones:Pat Jones::fs3:c:::::finance::::::

   The following shows a complete bulk file containing a set of
   delete  lines  combined  with  a  savevolume  line.  Because
   smith, pat, and rogers appear before the savevolume  command
   and  their third field is blank, the volume will be removed.
   The volume for terry will not be removed, but johnson's will
   be  because  the  delvolume in the third field overrides the
   current default.

       delete smith:/afs/transarc.com/usr/smith
       delete pat:/afs/transarc.com/usr/pat
       delete rogers:/afs/transarc.com/usr/rogers
       savevolume
       delete terry:/afs/transarc.com/usr/terry
       delete johnson:/afs/transarc.com/usr/johnson:delvolu

   The following exec  example  supposes  that  the  bulk  file
   contains  a  set of add lines followed by delete lines.  The
   operator places this line between the two sets to flag  when
   the additions are finished and the deletions beginning.

       exec echo "Additions completed; beginning deletions.



PRIVILEGE REQUIRED

   Issuer  (or  person  named by -admin argument) must have the
   privileges necessary to run all of the commands in the  bulk
   file individually.

MORE INFORMATION
