RE: Re: NT username detectable?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Won't "GetEnv" get the environment of the machine the script is run on?
So wouldn't that end up giving you the login of the user logged into the
web server, not the remote user?

I just did a test and it didn't work.  And I don't see my domain
username anywhere in the $_ENV variable either.

Here's a way to do it without calling NBTSTAT, but essentially the same
method with the same flaws:
http://www.experts-exchange.com/Web/Web_Languages/PHP/Q_20562144.html


On this site:
http://vanlandw.no-ip.com/php/test2.php

The PHPINFO shows a LOGON_USER but mine doesn't.  How odd.  Their
LOGON_USER is blank, but it still shows up where it doesn't on my
server.  Wonder why?  Anyone have any thoughts?  (Maybe it's blank
because it's trying to get MY username and that doesn't work across the
internet?  Still not sure why it shows up on their PHPINFO and not
mine).


Looks like "Integrated Windows Authentication" needs to be turned ON on
the server in order to access these variables.  Which makes sense.  I
need to talk to our IT guys and see if they can switch that ON for me.

Here's some info:
http://forums.devshed.com/t66723/s.html
http://www.microsoft.com/windows2000/en/server/iis/default.asp
http://www.microsoft.com/windows2000/en/server/iis/htm/core/iiabasc.htm?
id=75#challenge

Hope this helps!

-TG



> -----Original Message-----
> From: Manuel Lemos [mailto:mlemos@xxxxxxx] 
> Sent: Thursday, September 02, 2004 6:02 PM
> To: php-windows@xxxxxxxxxxxxx
> Subject:  Re: NT username detectable?
> 
> 
> Hello,
> 
> On 09/02/2004 04:48 PM, GHaider@xxxxxxxxxx wrote:
> > In the html headers, the server sees the clients OS, user agent, IP 
> > address etc. Is there a way on a local LAN a server might 
> be able to know 
> > the username of the client that sends a request?
> > 
> > I've checked all $_SERVER variables, PHP_AUTH_USER  etc 
> require the auth 
> > box to be displayed. I'm thinking it might be possible to 
> know which user 
> > is logged in when the request is made, possibly by using 
> COM or even 
> > (gasp) .NET, without having to ask the user his username.
> > 
> > Any ideas if this can be accomplished at all?
> > 
> > Right now we have Firefox clients and Apache with PHP in an Active 
> > Directory domain with NT4 compatibility, but we can move to 
> IE6 with 
> > IIS+PHP if that will work.
> 
> If the Web server is configured to request NTLM authentication, your 
> script may access the authenticated user via GetEnv("LOGON_USER") .
> 
> -- 
> 
> Regards,
> Manuel Lemos
> 
> PHP Classes - Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
> 
> PHP Reviews - Reviews of PHP books and other products
> http://www.phpclasses.org/reviews/
> 
> Metastorage - Data object relational mapping layer generator
> http://www.meta-language.net/metastorage.html
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux