Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!jpl-devvax!lwall From: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Newsgroups: comp.unix.wizards Subject: Re: Special tasks at login [was Re: Automatic login script execution] Keywords: login Message-ID: <7739@jpl-devvax.JPL.NASA.GOV> Date: 11 Apr 90 19:47:58 GMT References: <4147@uceng.UC.EDU> <262284c4.2013@petunia.CalPoly.EDU> <28003@ut-emx.UUCP> Reply-To: lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) Organization: Jet Propulsion Laboratory, Pasadena, CA Lines: 35 In article <28003@ut-emx.UUCP> erlkonig@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@jpl-devvax.jpl.nasa.gov