LOGIN
=====

The LOGIN command is used to gain access to the system. Yes, I know that
under TOS, this is a joke since you can to everything you like from the
desktop, but LOGIN still has a purpose: It initialises your working
environment. It even allows you to log in on the serial or MIDI ports.
If you just double-click on GUS from the desktop, you don't need this.

You can influence the behaviour of LOGIN with the following options:

-a	Redirect input and output. (This is for "AUX".) If set, GEMDOS I/O
	redirection is used to allow users to log in on the serial port.
	See the -b and -i options which change the meaning of this option.
	If the -a option is given, no login without password is accepted.
	If you don't have a password on your account, you cannot log in
	from anywhere but the system console. This is a security feature.
	
	If LOGIN is listening on the serial port, a carrier loss will
	terminate the program. If there was no carrier to begin with,
	nothing happens.

-b	This option specifies that BIOS-level redirection (trap 13 is
	intercepted) is to be used for the -a option. You must specify
	the port you want to use, either AUX or MIDI, as an argument to
	this option (as	in "LOGIN -a -b MIDI").

-i	Use the redirection mechanism of the IO resident program by Andy  Inman.
	Don't ask me for a copy; I've lost it long ago. IO is a really nifty
	program; it lets you redirect input and output to the serial port and
	console simultaneously. If you have a copy, let me know.
	
-N	Assume UUCICO is a "new-style" UUCICO (>= version 3.79); this is the
	default.
    
-O	Assume UUCICO is an "old-style" UUCICO (<= version 3.6).

Shell logins
------------

Shell logins are the normal case: A user just wants to use the system.
For shell logins, LOGIN sets the $TTY and $TTYLVL environment variables as
follows (see hush(1)):

options          $TTY    $TTYLVL
                 "CON"   "XBIOS"
-a               "AUX"   "GEMDOS"
-a -b AUX        "AUX"   "BIOS"
-a -b MIDI       "MIDI"  "BIOS"
-a -i            "AUX"   "BIOS"

The mail folder file is checked; if there is mail, a message is displayed.
The $MAIL environment variable is set to the name if this file.

UUCP logins
-----------

LOGIN will detect and handle UUCP logins. A UUCP login is defined as
a login for a user which shell is called UUCICO. It can have any drive,
path or extension, but the trunk filename must be "UUCICO". In the
$PASSWD file, the login (user) name must be exactly one leading
character, followed by the site name. (I suggest that the leading
character be a "U", so the site "cloud9" will use the login name
"Ucloud9". The home directory MUST be the spool directory as given
in the $XHOSTS file.

After a UUCP login, the $DOQUEUE command is executed if there are any
".X" files in the $MAILQ directory.

User names and passwords are limited to sixteen characters each.
