PHP Classes

How to read Windows logged username with PHP Apache MySQL: Get the windows domain username

Recommend this page to a friend!
  All requests RSS feed  >  How to read Windows logged username w...  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

How to read Windows logged username with PHP Apache MySQL

A request is featured when there is no good recommended package on the site when it is posted. Edit

Picture of muabshir by muabshir - 7 years ago (2016-10-28)

Get the windows domain username

This request is clear and relevant.
This request is not clear or is not relevant.

+2

I am running a network. Here I have a domain controller (DC) I have many applications developed and running in PHP, MySQL, Apache. Every thing is working fine.

Now I want to bring up a script on this local Web site. The first problem is that I want to detect which one of network users (active directory users) are logged in with PHP.

I was wondering if I could just use a function or something. That its output is the AD username and user group.

  • 3 Clarification requests
  • 4. Picture of Maik Greubel by Maik Greubel - 6 years ago (2017-08-17) Reply

    loune.net/2007/10/simple-lightweight-ntlm-in-php/

    This page explains how NTLM part can be extracted from browser headers.

    BR

    • 2. Picture of Lukasz Józwiak by Lukasz Józwiak - 7 years ago (2016-10-30) Reply

      Hi

      You can use to PHP DOTNET without accessing shell but up to .NET 3.5. Of cource if run on Windows Machine, or try NetPhp is available on github

      • 1. Picture of Marco Afonso by Marco Afonso - 7 years ago (2016-10-30) Reply

        Hello,

        If you want the user to authenticate on the domain controller, use PHP LDAP extention.

        If you want to know which users, on all your network computers, are logged in, you will want to ask each computers for active users sessions. For this, you will want to run a powershell script from PHP.

        • 3. Picture of Stefan Jibrail Froelich by Stefan Jibrail Froelich - 7 years ago (2016-10-30) in reply to comment 1 by Marco Afonso Comment

          Only way to actually get this to work.

      Ask clarification

      Recommend package
      : 
      :