Catching user switching and getting current active user from root on linux
James Mills
prologic at shortcircuit.net.au
Tue Nov 30 18:04:10 EST 2010
On Wed, Dec 1, 2010 at 8:54 AM, Tim Harig <usernet at ilthio.net> wrote:
> Well you could use inotify to trigger on any changes to /var/log/wtmp.
> When a change is detected, you could check of deltas in the output of "who
> -a" to figure out what has changed since the last time wtmp triggered.
This is a good idea and you could also
make use of the following library:
http://pypi.python.org/pypi?:action=search&term=utmp&submit=search
cheers
James
--
-- James Mills
--
-- "Problems are solved by method"
More information about the Python-list
mailing list