SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Zealot keith5885's Avatar
    Join Date
    Jun 2006
    Location
    at my computer
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Windows Authentication to get Windows Login ID

    Hello,

    I've been looking for a easy way to get the users windows ID on my intranet portal PHP application. I found a few things but nothing that promising.

    I have a MSSQL database and PHP on a IIS server. AD windows environment.

    Any ideas for me to look into? Anyone done this?

    Thanks in advance!

    -Keith
    Thanks Sitepoint!

  2. #2
    SitePoint Zealot keith5885's Avatar
    Join Date
    Jun 2006
    Location
    at my computer
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Anyone have any direction?

    I have googled and found a few things but nothing great. Forums search doesn't turn up much either.
    Thanks Sitepoint!

  3. #3
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    2 Thread(s)
    Hi keith5885,

    A long shot ... Active Directory is essentially ldap that is wrapped. You may look into reading Active Directory via an ldap tool. Then you may be able to use one of the PHP ldap classes to tap into the Active Directory ldap. I can tell you that expect this to be very hairy experience.

    Regards,
    Steve
    ictus==""

  4. #4
    SitePoint Addict
    Join Date
    Apr 2009
    Posts
    356
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    XP anyway puts the username in an environment variable USERNAME on the client workstation, maybe you can get the username from javascript in the browser.

    Or if IIS is in windows authentication mode I think there is a server variable with the username that you can retrieve with asp, and probably is available to php too.
    Doug G
    =====
    "If you ain't the lead dog, the view is always the same - Anon

  5. #5
    Theoretical Physics Student bronze trophy Jake Arkinstall's Avatar
    Join Date
    May 2006
    Location
    Lancaster University, UK
    Posts
    7,062
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    If it's on the intranet, and you have access to the startup scripts of computers on the network, you could create a startup script to log them into the intranet upon login.

    Though I'd like to point out that instant-login can have some nasty security consequences - it might just be easier to make them log in.
    Jake Arkinstall
    "Sometimes you don't need to reinvent the wheel;
    Sometimes its enough to make that wheel more rounded"-Molona

  6. #6
    SitePoint Member
    Join Date
    Jan 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This entry from stackoverflow may help http://stackoverflow.com/questions/1...sername-in-php. the integrated security model that Windows provides allows for the credential to be cached and passed on to the server.

  7. #7
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    2 Thread(s)
    As the original OP of this thread last posted in June, it is safe for this thread to be closed.
    ictus==""


Bookmarks

Posting Permissions

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