#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    1
    Rep Power
    0

    PHP and Active Directory


    Hello every body..

    I'm new in here.

    First and foremost, I wish everyone a Merry Christmas and a Happy New Year..

    I have a few questions:

    - I have some users already logged into the domain, is it possible to use their Windows sessions instead they must log on my website which is Active Directory user protected?

    So then it is possible for my users do not need to log in, but automatically logged into my user protected page. They use Windows session?

    Can this be done?

    My second question is whether it is possible to change the password on its own website? So change it directly in Active Directory from my website.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2009
    Posts
    40
    Rep Power
    15
    Originally Posted by hoevring
    Hello every body..

    I'm new in here.

    First and foremost, I wish everyone a Merry Christmas and a Happy New Year..

    I have a few questions:

    - I have some users already logged into the domain, is it possible to use their Windows sessions instead they must log on my website which is Active Directory user protected?

    So then it is possible for my users do not need to log in, but automatically logged into my user protected page. They use Windows session?

    Can this be done?

    My second question is whether it is possible to change the password on its own website? So change it directly in Active Directory from my website.
    You can use mod_authz_ldap and put this in an .htaccess file;

    Code:
    AuthType Basic
    AuthBasicProvider ldap
    AuthName "My company"
    AuthLDAPURL "ldap://domaincontroller:389/OU=???,DC=example,DC=com?sAMAccountName?sub?(objectClass=*)"
    AuthLDAPBindDN "[username@domainsuffix.com]"
    AuthLDAPBindPassword "[password]"
    require valid-user
    However, even in IE a pop up box will appear requiring a valid user and I am trying to bypass this but have not found the answer yet. Once logged in, you can use php to get the username by using $_SERVER['PHP_AUTH_USER'] variable.
    Last edited by kbradwick; January 27th, 2010 at 09:46 AM.

IMN logo majestic logo threadwatch logo seochat tools logo