Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Runs As Root' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Runs As Root
Authored by: pmccann on Jan 16, '03 05:54:11PM

Hmm, not sure what the state of play is when this script is run (ie, is the user still logged in and about to be logged out?), but if he or she is still listed as logged in you should be able to use something as simple as

who | grep console | cut -f 1 -d ' '

If the user is gone then all bets are off. Looking at the developer page linked to the original story I'm unfortunately going to have to bet on the latter ("-LogoutHook The full path to a script or tool to run when a user successfully logs out.") There: not *completely* useless am I? Errr...

Cheers,
Paul



[ Reply to This | # ]