Jump to content

PHP - Displaying Local User within a .php page


z20let

Recommended Posts

I think it entirely depends on what server your running and what info that server has access to.

 

I was trying to do this before and found it was impossible to grab that info from the client.

 

By echo'ing out phpinfo() you can see what info is available for you to grab.

I think it entirely depends on what server your running and what info that server has access to.

 

I was trying to do this before and found it was impossible to grab that info from the client.

 

By echo'ing out phpinfo() you can see what info is available for you to grab.

 

We are just testing it locally at the moment, we have downloaded a module for apache (2.2) "mod_auth_sspi" however now that we have it the IT Officer has noticed that there are lots of other files which have been downloaded with it that may not have anything to do with the actual module file itself!?!?

 

God damn Apache!!!!  >:(

Print current user (windows):

 

<?php
echo getenv("USERNAME");
?>

 

 

We are just going to try this now... I will let you know the result!

 

No luck unfortunately, it doesn't seem to do anything???

 

Remember we are running Apache 2.2 with MySQL 5 and PHP 5

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.