[SPAM] RE: [mod_python] getting Windows username (REMOTE_USER)

Bart scarfboy at gmail.com
Wed Dec 12 15:56:45 EST 2007


> > Graham gave me a tip on a module and I will try that.  But i will give a
> more detailed description of my goal :)
> >
> > At work, we have a domain.  Users will log onto a machine with a user/pass
> on that domain.  I need to get that username, so i can use that as the
> website credentials.  This removes this responsibility from me and also
> allows them to "login" transparently.
> > On a previous project, i was using IIS 6 and PHP.  I was able to get the
> username from the REMOTE_USER or AUTH_USER environment variable, as seen
> from phpinfo().  So i am looking for a way to get at this info with
> apache/python.

The remote user should be fetchable in anything under the sun,
so I don't really get what the problem actually is (was?).

(As I recall, unless the server requests and does actual HTTP auth
 (that dialog asking for user/pass, in most cases), the login
 values you used won't make it to the auth variables even
 if you send it, but that seems to apply to PHP too, so isn't
 relevant as it was working before too.)

But you probably know this, since you had it working before.
And apparently now too, since you seem to have moved on
to actually using the login values...


(Note: I was confused partly because I didn't think  it would be possible
 for a browser to access the environment to fetch the username,
 which made me wonder what exactly you were asking.
 It seems that Internet Explorer will allow it via ActiveX and
 some relaxed security settings, which is probably what you're using.
 Interesting.)

--Bart


More information about the Mod_python mailing list