Special tasks at login [was Re: Automatic login script execution]

Larry Wall lwall at jpl-devvax.JPL.NASA.GOV
Thu Apr 12 05:47:58 AEST 1990


In article <28003 at ut-emx.UUCP> erlkonig at walt.cc.utexas.edu (Christopher North-Keys) writes:
: What is needed is a way to specify a *program* for login to run as each user
: logs in.  Currently on /usr/ucb/quota appears to be used this way.  So...
: backup your login program and do the following (after backup it up):
: 
: (Have you backed up your login first?)
: 
: Whip out your GNUEmacs or other binary-capable editor;  note that this
: generally does *not* include VI.
: 
: Load in the login program *executable* for editing.
: 
: Notice the /usr/ucb/quota string with the binary.  This string is the
: argument to a call to run another program.
: 
: Warnings:  Do NOT alter the length of the binary.
:            Do NOT try to replace /usr/ucb/quota with a longer pathname.
:            Do NOT put in a path to a script, it would be *very* insecure.
: 
: Replace the existing path with the new path of the same length or less, padding
: any leftover space with zeros.  Be very careful to exactly match the length
: of the original path with the sum of the new pathlength and trailing zeros.
: 
: A program path like /usr/etc/logex might be appropriate (this assumes that
: the path /usr/ucb/quota was actually used on your system;  BE WARNED).
: 
: The resulting file, once saved, will contain a hook which can be filled with
: virtually any utility.

Or just say

	perl -pi.bak -e 's:/usr/bin/quota:/usr/etc/logex:' /bin/login

Larry Wall
lwall at jpl-devvax.jpl.nasa.gov



More information about the Comp.unix.wizards mailing list