home *** CD-ROM | disk | FTP | other *** search
- This is the explanatory document for John F. Haugh II's login replacement.
- This document is for version 2, last modified on 11/26/90.
-
- This software is copyright 1988, 1989, 1990, John F. Haugh II. All rights
- reserved. Use, duplication and disclosure is permitted according to the
- guidelines listed below.
-
- This software is being provided as a freely redistributable login clone.
- You may distribute this software provided you do not charge for other than
- transmission costs. You are free to copy this software provided you
- do not restrict the rights of the recipients to further copy this software.
-
- THIS SOFTWARE IS BEING DISTRIBUTED AS-IS. THE AUTHORS DISCLAIM ALL
- LIABILITY FOR ANY CONSEQUENCES OF USE. THE USER IS SOLELY RESPONSIBLE
- FOR THE MAINTENANCE OF THIS SOFTWARE PACKAGE. THE AUTHORS ARE UNDER NO
- OBLIGATION TO PROVIDE MODIFICATIONS OR IMPROVEMENTS. THE USER IS
- ENCOURAGE TO TAKE ANY AND ALL STEPS NEEDED TO PROTECT AGAINST ACCIDENTAL
- LOSE OF INFORMATION OR MACHINE RESOURCES.
-
- Special thanks are due to Chip Rosenthal for his fine testing efforts;
- to Steve Simmons for his work in porting this code to BSD; and to Bill
- Kennedy for his contributions of LaserJet printer time and energies.
-
- Begin by reading and editing the config.h file. All options are selected
- by using #define's. A brief description for each available option appears
- below. You may want to print this file out as it is LONG and you will
- need to refer to it while editting config.h. You will also have to edit
- the Makefile. The possible differences are documented there. Pay close
- attention to the install: rule. DO NOT MAIL ME DIFFERENCES FOR VARIOUS
- INSTALLATION PROBLEMS. If you must share your experiences, do so on the
- net. Login now runs on about 30 different varieties of UNIX that I have
- been made aware of.
-
- Note that there are MANY options. As distributed most options are turned
- on, which produces a really nice package. This is the system as used on
- the authors' machines.
-
- Dialup Password Files -
- This option permits individual ports to have an additional
- password prompted for on a by-shell basis. /etc/dialups
- contains a list of dialup ports, d_passwd contains the
- password for each shell requiring a dialup password.
-
- Select this option by defining the DIALUP macro.
-
- Port Access Times File -
- This option permits individual ports to have restrictions
- based on user name and time of day and week.
-
- Select this option by defining the PORTTIME macro.
-
- Shadow [ unreadable ] Password Files -
- This option utilizes an alternate, non-readable file to
- contain the actual encrypted passwords. This is presumed
- to increase system security by increasing the difficulty
- with which system crackers obtain encrypted passwords.
-
- Select this option by defining the SHADOWPWD macro.
-
- DBM Password Files -
- This option utilizes the DBM database access routines to
- increase the performance of user name and ID lookups in the
- password file.
-
- Select this option by defining both the DBM and GETPWENT
- macros. The FGETPWENT macro must also be defined or the
- fgetpwent() library routine must be present.
-
- Double Length Passwords -
- This option extends the maximum length of a user password
- to 16 characters from eight.
-
- Select this option by defining the DOUBLESIZE macro.
- Credit for this option is due Jonathan Bayer.
-
- Obscure Password Testing -
- This option includes code to test user passwords for
- complexity. The programmer is encouraged to edit the
- file obscure.c to add additional methods for detecting
- simplistic passwords.
-
- Select this option by defining the OBSCURE macro.
-
- Additionally, the PASSLENGTH macro must be defined to
- control the minimum length for a legal password.
-
- Mandatory Password Prompting -
- This option requires all passwords, including null ones,
- to be prompted for. Traditionally an account with a
- password field of '::' does not require prompting for.
- This option modifies this behavior to require even
- null passwords be prompted for.
-
- Select this option by defining the NOBLANK macro.
-
- Password Aging Defaults -
- You may select the default number of days during which a
- password is valid. The pwconv command adds aging
- information to accounts which do not include it already.
-
- The MINDAYS macro must be defined to be the minimum
- number of days which must pass before a password may be
- changed. The MAXDAYS macro must be defined to be the
- maximum number of days which a password will remain
- valid during.
-
- The WARNDAYS macro controls how many days warning a user
- is given that their password is about to expire. The
- default is 10.
-
- HZ Environmental Variable -
- This option pre-defines the HZ environmental variable.
- Certain systems require this variable be defined for
- system time reporting functions to work properly.
-
- Select this option by defining the HZ macro to have
- the desired environmental variable value.
-
- TZ Environmental Variable -
- This option pre-defines the TZ environmental variable.
- This provides a default timezone variable for use by
- various utilities.
-
- Select this option by defining the TZ macro to have
- the desired environmental variable value, or the name
- of the file containing the desired value.
-
- Password Aging -
- This option includes code to perform password aging.
- Password aging is presumed to increase system security
- by forcing users to change passwords on a regular
- basis. The resolution on password age is in weeks for
- non-shadow password systems and in days otherwise.
-
- Select this option by defining the AGING macro.
-
- Mailbox Checking -
- This option includes code to check the status of the
- user's mailbox. One of three messages are produced
- depending on the status of the user's mailbox.
-
- Select this option by defining the MAILCHECK macro.
-
- Console Restricted Root Logins -
- This option restricts the port which root may legally
- login on. This option presumably increases system
- security by preventing outside attacks against the root
- account.
-
- Select this option by defining the CONSOLE macro to
- have the desired port name. If this file is a regular
- file, it is considered to contain a list of legal port
- names, one per line. Note that the port names DO NOT
- begin with "/dev/" and that a file name would have to
- be fully qualified. See config.h for a pair of
- examples.
-
- Restricted User Logins -
- This option permits you to specify a file which disables
- user logins. This options permits you to keep normal
- users off of the system while performing maintenance
- functions.
-
- Select this option by defining NOLOGINS to be the name
- of the file to use.
-
- Restricted Use Accounts -
- This option permits certain accounts to be used for
- identification purposes only. This options associates
- login ID's with UID's, such as for disk space accounting
- or anonymous FTP accounts. Passwords for these accounts
- may only be changed by root.
-
- Select this option by defining NOUSE to be the string
- to include in the password file in place of the user's
- shell.
-
- Message of the Day Printing -
- This option causes the message of the day to be
- printed at login time.
-
- Select this option by defining the MOTD macro.
-
- If you wish this feature to be overriden on a per-user
- basis, define the macro HUSHLOGIN and users may then
- turn off the /etc/motd message by creating a file
- '.hushlogin' in their home directories.
-
- Last Login Time Logging -
- This option causes a record to be made of successful
- logins in /usr/adm/lastlog. The format of the
- structure is defined in lastlog.h.
-
- Select this option by defining the LASTLOG macro.
-
- You will need to determine if you system already has
- a lastlog.h file and use that file if present.
-
- Failed Login Logging -
- This option causes a record to be kept of the most
- recent login failure by date and port. A cummulative
- count of failures is maintained and compared against
- an allowable limit.
-
- Select this option by defining the FAILLOG macro.
-
- An additional option is provided which will create
- utmp-like entries for each failed login. Because of
- security concerns, only valid account names will be
- logged.
-
- Select this option by defining the FTMP macro to be
- the name of a utmp-like file. You may control the
- recording of unknown login names by defining the
- UNKNOWNS macro. This prevents possible passwords from
- being entered into the FTMP file.
-
- See the file faillog.h and config.h for more details.
-
- Terminal Permissions -
- This option allows the terminal modes to be set at
- login time. This is particularly useful to disable
- messages on user's terminals.
-
- Select this option by defining the TTYPERM macro as
- having the desired mode.
-
- Terminal Type Setup -
- This option allows the terminal type to be set at
- login time. The environmental variable TERM will be
- set from the specified terminal to port mapping
- file.
-
- Select this option by defining the TTYTYPE macro as
- having the value of the name of the type to port
- mapping file. Credit for this option is due Chip
- Rosenthal.
-
- File Size Setting -
- This option includes code to set the user's ulimit
- at login time. Additional code to set the umask and
- nice value is also included.
-
- Select this option by defining the QUOTAS macro.
-
- Switch-User Logging -
- This option causes su(1) to log attempts to switch
- users. Su(1) will log all attempt, giving the old
- and new user ID's, tty port, and time. It also
- indicates if the attempt was successful.
-
- Select this option by defining the SULOG macro to
- have the value of the name of the file you want
- attempts logged to.
-
- Configurable Editing Keys -
- This options allows the erase and kill characters to
- be selected. A default value is provided. By default
- ERASE will be ^H and KILL will be ^U.
-
- Select this option by defining the ERASECHAR macro
- to be the desired erase character and the KILLCHAR
- macro to be the desired KILL character.
-
- Default ulimit and umask Values -
- This option allows you to select the default values
- for ulimit and umask, allowing you to avoid
- regenerating your system kernel. These values may be
- overriden with appropriate entries in the GECOS field.
-
- Select the default ulimit by defining the ULIMIT
- macro, and the default umask by defining the UMASK
- macro.
-
- Warning: These values will not apply to processes
- executed by /etc/cron or any of their children.
-
- BSD Notes: Steve Simmons scs@iti.org
-
- The full port of the shadow package to BSD is not complete; but some
- of the issues have been worked out. These notes describe the current
- state of things:
-
- In order to make use of password aging under BSD, minor changes to
- /usr/include/pwd.h and getpwent() are needed. These changes are to
- keep the password age from messing up the encrypted password when not
- using shadow passwords, and involve placing a new field in the password
- data structure. To use this, you should apply the following two patches:
- pwd.h.patch
- getpwent.c.patch
- to the BSD /usr/include/pwd.h and /usr/src/lib/libc/gen/getpwent.c,
- respectively. After applying the patches, rebuild your standard C
- library with the new getpwent. Programs which use the old getpwent
- will fail on password checking if they do a strcmp rather than a strncmp.
- [ I do not seem to have these two patches. I have provided an entire
- getpwent collection of code which may be useful instead. -jfh ]
-
- These changes are based on BSD4.3, not Tahoe
-
- ToDo BSD:
-
- I'm working on this in my copious spare time (hah!); any help would
- be appreciated. If you decide to help, do these independantly rather
- than rework BSD code! Keep it redistributable!
-
- No dbm functions have been put in place. Dbm functionality is needed
- for both /etc/password and /etc/shadow management. [ It is now possible
- to create /etc/passwd.dir and /etc/passwd.pag using the new mkpasswd
- command. getpwuid and getpwnam both use these files. Also, the
- commands chfn, chsh, and chage all update the DBM files. -jfh ]
-
- The BSD GECOS field gets used for lots more stuff than the USG. At a
- minimum this functionality should be duplicated under BSD; better is to put
- it into USG as well; still better would be to make the chfn command for
- both systems; best would be site-configurable data to be put into GECOS/chfn.
- [ this is now possible using chfn and the -o option. - jfh ]
-