+ Post New Thread
Results 1 to 5 of 5
Coding Thread, PHP Logged on computer Username in Coding and Web Development; Hi Guys i am wondering if any of you know how to show the username in php of a logged ...
  1. #1

    Join Date
    Dec 2012
    Location
    Manchester
    Posts
    13
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    4

    PHP Logged on computer Username

    Hi Guys
    i am wondering if any of you know how to show the username in php of a logged on computer user
    this is for a intranet system i am working on so students/staff dont have to login to the system when they are in the school and automaticaly brings there infomation up depending what there username is

    jtoland

  2. #2
    Boredguy's Avatar
    Join Date
    Jun 2011
    Location
    Swindon
    Posts
    600
    Thank Post
    4
    Thanked 133 Times in 124 Posts
    Rep Power
    50
    if ($_SERVER["AUTH_USER"] != ""){
    $temp = explode("\\",$_SERVER["AUTH_USER"]);
    echo $temp[1];
    }
    If your running php on a windows box, this will work as long as you have intergrated authentication enabled on the webfolder.

  3. #3

    Join Date
    Dec 2012
    Location
    Manchester
    Posts
    13
    Thank Post
    0
    Thanked 2 Times in 2 Posts
    Rep Power
    4
    thanks
    but i am running the server on linux and its not located in the school i was wondering if there was a way to remotely grab the infomation when a user visits the site
    jtoland

  4. #4

    powdarrmonkey's Avatar
    Join Date
    Feb 2008
    Location
    Alcester, Warwickshire
    Posts
    4,859
    Thank Post
    412
    Thanked 777 Times in 650 Posts
    Rep Power
    182
    You can't. It would be a gross information disclosure vulnerability if you could.

  5. #5
    SovietRussia's Avatar
    Join Date
    Mar 2013
    Location
    Powys, Wales
    Posts
    642
    Thank Post
    70
    Thanked 145 Times in 111 Posts
    Rep Power
    47
    Quote Originally Posted by jtoland View Post
    thanks
    but i am running the server on linux and its not located in the school i was wondering if there was a way to remotely grab the infomation when a user visits the site
    jtoland
    Someone has built for Apache a NTLM module which can grab the username, Google for Apache NTLM

SHARE:
+ Post New Thread

Similar Threads

  1. Replies: 2
    Last Post: 20th May 2011, 10:58 AM
  2. How to prevent user from logging on to computers in an OU?
    By Gerry in forum How do you do....it?
    Replies: 1
    Last Post: 11th March 2011, 04:26 PM
  3. Log on to specific computers
    By kili in forum Scripts
    Replies: 7
    Last Post: 10th February 2011, 08:53 AM
  4. Logging on multiple computers.
    By gwendes in forum Network and Classroom Management
    Replies: 20
    Last Post: 12th November 2007, 11:56 PM
  5. Replies: 4
    Last Post: 12th July 2007, 08:11 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •