home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wupost!crcnis1.unl.edu!crcnis1.unl.edu!manager
- From: Jeremy Bettis <jbettis@cse.unl.edu>
- Newsgroups: comp.unix.xenix.sco
- Subject: Re: Forcing a user to go through a program at logout?
- Date: 9 Jan 1993 06:06:14 GMT
- Organization: University of Nebraska--Lincoln
- Lines: 24
- Distribution: world
- Message-ID: <1ilq0mINNnv5@crcnis1.unl.edu>
- References: <9301081733.AA15738@dynamix.com>
- NNTP-Posting-Host: cse.unl.edu
-
- david@dynamix.com (David L Jarvis) writes:
-
- >>
- >> Is there anyway to *force* a user to go through a program prior to logout?
- >>
-
- >Sure ... we use "trap $HOME/.logout 0" in our .profile for ksh ...
-
- This will not "force" the user to run .logout... they can always just type
- trap - 0 and unset the trap again. Or they could exit with exit 1, they
- could drop carrier if possible, or they could just type exec ksh sometime
- during the session. I was using trap .logout 0 to run a logout file for
- myself, but I lost my trap when I would use newgrp, which execs a new shell
-
- My solution was to get bash, and compile it. It will execute a file
- called .bash_logout when exiting a login shell. (I think it will work
- even if an exec, or newgrp is used.)
-
-
- --
- Jeremy Bettis -*- Jerbo Jehoshaphat -*- University of Nebraska
- INET: jbettis@cse.unl.edu "Those who stand in the middle of the
- bt757@Cleveland.Freenet.Edu road are often hit by passing cars."
- BBS: The Dew Drop Inn (402)476-8807 3/12/24
-