Jump to content

php LDAP/Active Directory integration


arianhojat

Recommended Posts

Before when php was on a IIS box at work,

I just authenticated a person by looking at $_SERVER['AUTH_USER'] (which is magically provided by this Windows box to php even though its not the server doing authentication on our network),

then getting their info from that like domain/username (cut out the username with substring),

then looking in our mysql windowslogon JOIN userinfo table to find that username and some extra info associated them to store in session so pages on the intranet can access some useful data about the user.

 

But we want to move to a Linux box for our web server...

Someone recommended to me Active Directory for authentication...

i see that you should setup a user in A.D. for php web scripts to connect and get info. so pretend i did that.

but how you can query the database to ask what the current user is? seem like you can only get information by supplying parameters in with php LDAP functions but i dont know if u can ask what current signed in user is.

 

i saw some other options to possibly use NTLM authentication on linux with an apache module called mod_auth_ntlm_winbind. i dunno what is better way to do authenication (without user ever needing to sign into anything)?

 

Any suggestions? if suggest LDAP/Active Directory, can help with simple example how to get signed in user username?

Link to comment
https://forums.phpfreaks.com/topic/87775-php-ldapactive-directory-integration/
Share on other sites

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.