1 HGLOGIN
   HGLOGIN lets privileged users log in to  a  named  account  without
   having  to  know  the password for that account.  A process running
   under the target username is created.  Its  input  and  output  are
   read from a pseudo-terminal, which is controlled by HGLOGIN.


     $ HGLOGIN[/qualifiers] username [command]
2 Description
   HGLOGIN lets privileged users log in to  a  named  account  without
   having  to  know  the password for that account.  A process running
   under the target username is created.  Its  input  and  output  are
   read from a pseudo-terminal, which is controlled by HGLOGIN.

   Unlike BECOME and SWAP, the process created by HGLOGIN  is  a  full
   process,  with  all the privileges, rights identifiers, quotas, DCL
   symbols, logical names, etc., as well as anything else that is  set
   up in the target user's LOGIN.COM.

   HGLOGIN requires the target username as a parameter.  If  there  is
   other  text  on the line, HGLOGIN enters "single command mode." The
   remaining text is passed to the new process to be executed by  DCL.
   When  the command execution completes, the process is automatically
   logged out and control returns to the original process.
2 Parameters

username

   Specifies the username  under  which  the  new  process  is  to  be
   created.

command

   An optional command that will be executed by the new process.   The
   command  is  passed to the new process to be executed by DCL.  When
   the command  execution  completes,  the  process  is  automatically
   logged out and control returns to the original process.

   If no command is given, the user will enter interactive mode.
2 Qualifiers

/ESCAPE_CHARACTER

   /ESCAPE_CHARACTER=number

   Specifies a control  character  that  will  terminate  the  HGLOGIN
   session.   Normally, termination occurs when you log out of the new
   process.  To exit immediately, you can press the escape  character.
   The  default escape character is CTRL-D (/ESCAPE_CHARACTER=4).  You
   can specify any CTRL character from 0 to  31  except  CTRL-M  (13),
   CTRL-Q (17), CTRL-S (19), and CTRL-Z (26).

/PROMPT

   /PROMPT=string

   Specifies the default DCL prompt for the  new  process.   When  SET
   TERMINAL/INQUIRE  is  executed  for  the  process, you must use the
   /PROMPT qualifier to tell HGLOGIN what the DCL prompt will be  once
   the  process  is  logged  in.  HGLOGIN will then wait for the given
   prompt (which defaults to "$") before sending its commands  to  the
   process.

/QUIET

   /QUIET
   /NOQUIET

   Enables "quiet mode" when a command is given on the  command  line.
   Output from the new process is not displayed.

/UAF

   /UAF (default)
   /NOUAF

   Determines whether the SYSUAF flags for the process  apply  to  the
   HGLOGIN  process  creation.  You can specify /NOUAF to log in to an
   account that has been DISUSERed.
2 Limitations
   HGLOGIN's single-command mode will  not  work  properly  if  either
   SYLOGIN.COM  or the target user's LOGIN.COM include the command SET
   TERMINAL/INQUIRE.  Normally, the commands sent to the  process  are
   purged when the SET TERMINAL/INQUIRE command executes.

   In cases like this, you must use  the  /PROMPT  qualifier  to  tell
   HGLOGIN  what the DCL prompt will be once the process is logged in.
   HGLOGIN will then wait for the given prompt (which defaults to "$")
   before sending its commands to the process.

       $ hglogin/prompt="What?" system mail

   There is also a /NOQUIET qualifier that can be  given  to  override
   HGLOGIN's  "quiet  mode"  in  single-command mode.  HGLOGIN/NOQUIET
   will display all the output from the process.

   IF you try to use single-command mode and  never  see  any  output,
   type  LOGOUT  and  then  use  HGLOGIN/NOQUIET to see the output and
   prompt.  You can then use /PROMPT to force HGLOGIN to wait for  the
   DCL prompt.
2 Examples
       1.   $ hglogin :== $disk:[directory]HGLOGIN.EXE
            $ hglogin system
            Logging in as user SYSTEM
            Logout or press CTRL-D to exit
            SYSTEM$ 

       This  example  shows  how  to  login  to  account   SYSTEM   in
       interactive mode.  The effect will be similar to using SET HOST
       0 or TELNET to log in to local system.

       2.   $ hglogin postmaster mail
            Logging in as user SYSTEM
            Logout or press CTRL-D to exit
            MAIL>

       In the example above, you will be logged in as SYSTEM  and  the
       MAIL  command will be executed in the SYSTEM process.  When you
       QUIT or EXIT MAIL,  you're  automatically  logged  out  of  the
       SYSTEM process.
2 Author
   HGLOGIN was written by Hunter Goatley <goathunter@GOATLEY.COM>

   HGLOGIN is a rewrite and enhancement of the GLOGIN utility  written
   by Anthony C.  McCracken, Northern Arizona University, in 1992.

   Copyright © 1997, 2000, Hunter Goatley.  All rights reserved.
