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

Tim Harig usernet at ilthio.net
Mon Dec 13 21:53:29 EST 2010


On 2010-12-13, mpnordland <mpnordland 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

Apparantly you do not.  There is nothing that prevents me from downloading
from the web when I am not even at the computer.  The point people are
making is that there is no such thing as a single active user.  Any user
that has a running process is active.  Somebody is not going to appreciate
getting fired because somebody else scheduled a porn download at a time
when they happened to be flagged as the current user.

> 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

There is nothing definitive about a so-called "normal" enviroment and
since you didn't really specify anything, we had go make assumtpions
for ourselves.

Note also that a server is a piece of software, it need not be running
on server class hardware.  There are probably several local servers
running on your system right now.

As is commonly the case, the reason that you are having trouble with this
problem is that you are trying to solve it wrong in the first place.
You told us how you thought you should solve it which meant that we
couldn't help you because we didn't know what problem you were trying to
solve in the first place.  For future reference, always give a 10,000ft
explanation of the problem that you are actually trying to solve rather
then just the microcosm of the problem that you feel is relevant.

> 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.

As Carl has already pointed out, an authenticated proxy is the proper
way to get the individualized logging that you are looking for.
It is capable of logging each connection (including software from
which you might not have anticipated) with its own identified user of
origin. Even when several users are accessing the network at once, the
network connections can be tied directly to the person who initated
the connection.  Users cannot use somebody elses connection without
their authentication credentials.

With a little bit of scripting, the browser can be configured to
automatically use the user's credentials whenever the user account is
created so that the user never needs to enter their credentials manually
after logging in to their account.  All connections that attempt to
bypass the proxy should be firewalled.

> Have I passed the Turing test?

You still don't seem to understand how to use threads.  Heres a clue:
find a decent usenet client that actually displays them by default.  Or,
if you can't manage to get rid of that junky interface that is Google
Groups, at least select the option to view as a tree.  Then you might
be able to actually post your replies in the proper thread rather then
just appending on the the person who last posted.



More information about the Python-list mailing list