[wplug] Running commands on logout

Keir Josephson kjoseph at stargate.net
Tue Jul 1 22:16:49 EDT 2003


On Mon, 30 Jun 2003, Bob Schmertz wrote:

> Jason Dunn incurred the wrath of Bob on Jun 30, by saying
>
> >HI all,
> >
> >I'm looking for a way to run clean-up commands as users log out of my systems,
> >but I don't want to add anything to their individual shell logout files.  I
> >haven't had much luck in finding (if there are any) global files that run
> >when a user logs out that I could add a command to.  I'm using RH8, if that
> >helps any.
>
> Well, from my reading of info page, there doesn't appear to be a global
> logout file for bash.  There is for csh/tcsh: /etc/csh.logout.  Zsh also
> has /etc/zlogout.  Have your users switch to one of those :)

You could try setting the default the shell in /etc/passwd to one of these
then enable bash in /etc/profile.

Could you set it up to pause the login process while running the profile?
That way the user gets a login prompt and everything looks normal, but,
behind the scenes, the login process never really completes until the user
sends the exit or ^d signal to the shell. Then the remaining commands in
the .bashrc shell execute then exit.

-Keir

>
> --
> Cheers,
> Bob Schmertz
>
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>



More information about the wplug mailing list