[mod_python] getting Windows username (REMOTE_USER)

Brett Dixon drunkirishmic420 at hotmail.com
Sun Dec 9 20:31:49 EST 2007


In my python handler Directory directive, i have the AuthTpye set to basic, but thats about it.  I have tried "ntlm" but that hasnt done much.  Is there a windows specific auth handler?



> Date: Mon, 10 Dec 2007 07:04:52 +1100
> From: graham.dumpleton at gmail.com
> To: drunkirishmic420 at hotmail.com
> Subject: Re: [mod_python] getting Windows username (REMOTE_USER)
> CC: mlopes at orangeway.org; mod_python at modpython.org
> 
> REMOTE_USER in PHP should be the same as req.user in mod_python.
> 
> The req.user attribute actually is 'user' attribute of internal Apache
> request_rec structure. It is this value that is used to set
> REMOTE_USER in CGI variable environments and presumably PHP.
> 
> This attribute isn't restricted to just HTTP Basic/Digest
> authentication. Any authentication handler should be setting it
> correctly, whether that be some special Windows specific
> authentication mechanism or otherwise.
> 
> Do you have a Windows specific authentication handler enabled in your
> Apache configuration?
> 
> Graham
> 
> On 10/12/2007, Brett Dixon <drunkirishmic420 at hotmail.com> wrote:
> >
> > yes Marco, that is the user i am trying to retrieve.  If it's not possible
> > to get with apache/mod_python then its back to IIS i go :)
> >
> > Thanks guys
> >
> >
> >
> > ________________________________
> > Date: Sun, 9 Dec 2007 12:55:01 +0000
> > From: mlopes at orangeway.org
> > To: graham.dumpleton at gmail.com
> > Subject: Re: [mod_python] getting Windows username (REMOTE_USER)
> > CC: drunkirishmic420 at hotmail.com; mod_python at modpython.org
> >
> >
> > I'm guessing you're both talking about different things. I'm new to
> > mod_python but I'd say req.user is the HTTP user, the user given when the
> > user is prompt for authentication by apache.
> > The "user" Brett is asking about is the username of the user logged in a
> > remote windows machine, wich I'd say he'd never be able to get cause the
> > client will never send it to the server side for security and privacy
> > reasons.
> >
> > On 12/9/07, Graham Dumpleton <graham.dumpleton at gmail.com> wrote:
> >  It should be set if an Apache authentication handler has actually
> > authorised a user. If it isn't being set, then the URL isn't being
> > authenticated or the authentication handler isn't compliant and doing
> >  what is expected of an Apache authentication handler.
> >
> > What is the actual authentication handler you are using? What handler
> > phase are you trying to access this attribute?
> >
>