Catching user switching and getting current active user from root on linux

Carl Banks pavlovevidence at gmail.com
Mon Dec 13 18:40:47 EST 2010


On Dec 13, 3:04 pm, mpnordland <mpnordl... at gmail.com> wrote:
> I think I do understand multiuser systems, although I'm sorry I did
> not make my self clear. Yes, I understand that there can be multiple
> people logged in, and yes if you really wanted to, you could login as
> yourself as many times as you want. This is not a server based
> program, it is intended for use in a normal environment. The people
> using it will probably not be logging in multiple times as themselves,
> or someone else. The problem I have is I want monitor what sites the
> user visits, I need to know what sites were accessed by which user.
> So, a way to find which user is requesting what url is what I want.
> Have I passed the Turing test?

Install a web proxy.

In a pinch you can stat /dev/console to see who the owner is, which I
think was what they did last time I looked.

If you're ambitious there's some stuff you can do with netfilter to
attach user ids to network packets which you might be able to read
with your logging software.  How are you logging web site accesses
anyway?  That would be helpful to know.


Carl Banks



More information about the Python-list mailing list