RE: NT username detectable?

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

 



Ok, I finally talked our IT guys into turning off the "Anonymous Access"
and I can get into the PHP scripts just fine and "LOGON_USER" is
populated just fine, but some of the other users in the company get a
popup login request when they hit my PHP pages.

If they log in with their usual domain login, password and domain name,
they can get in just fine.

The first thought is permissions.  But now it's doing it to my login
which it didn't do at first.  And I should have full permissions on that
folder and all.

Could it be that that machine MAY be on another domain?  We apparently
have two domains here and I'm not sure which one it belongs to.  Does
that make any sense to anyone?

Thanks in advance.  Just wondering if anyone else had run into this
issue.

-TG

> -----Original Message-----
> From: Gryffyn, Trevor 
> Sent: Friday, September 03, 2004 9:09 AM
> To: php-windows@xxxxxxxxxxxxx
> Cc: GHaider@xxxxxxxxxx
> Subject: RE:  NT username detectable?
> 
> 
> Probably not the most reliable way (actually, I know it's not 100%
> reliable), but the way I use for quick and dirty, informal 
> usage logging
> is this:
> 
> $ipaddress = $_SERVER["REMOTE_ADDR"];
> 
> $nbtstat = "nbtstat -A ". $ipaddress;
> exec ($nbtstat,$result);
> foreach ($result as $row) {
>   if (strpos($row,"<03>")) $username = strtok($row," ");
> }
> 
> 
> This only works if you're on the same network and the users 
> are logging
> into their box.
> 
> It seems to fail when someone is logged into multiple 
> machines at once,
> you end up getting the computer name or something.  Probably does this
> under other circumstances as well.  But there's some little 
> 80% reliable
> way of doing it.
> 
> If you find a better way, by all means let me know!
> 
> -TG
> 
> > -----Original Message-----
> > From: GHaider@xxxxxxxxxx [mailto:GHaider@xxxxxxxxxx] 
> > Sent: Thursday, September 02, 2004 3:49 PM
> > To: php-windows@xxxxxxxxxxxxx
> > Subject:  NT username detectable?
> > 
> > 
> > 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.
> > 
> 
> -- 
> 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