Integrating PHP and Windows Authentication

Programming, for all ages and all languages.
Post Reply
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Integrating PHP and Windows Authentication

Post by Neo »

I work on a Windows Domain LAN right now.
I would like to create a few webpages (host an intranet site actually) with PHP that require users to log into to them using their Windows Domain username and passwords.
Since every user already has a Windows username and password they could use this instead of having to sign up at the new site.
The only thing is I know next to nothing of PHP and was wondering how this is done or if it is possible?
Is there any way I could get PHP to use the username and password from the Windows domain?
I am using Apache as a webserver on a separate Debian machine right now which is accessbile by all the LAN users.
Only Human
AR

Re:Integrating PHP and Windows Authentication

Post by AR »

IIS on Windows has built in "Windows Authentication" but I don't know how you're going to get it on Linux, the only way (AFAIK) on Linux to even access a Windows Domain is via Samba and I doubt you can integrate that into Apache (unless there's some way to execute a shell script from Apache and Samba provides a login mechanism program that you can use).
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Re:Integrating PHP and Windows Authentication

Post by Neo »

Isn't there anyway we can do this with one of the Apache modules like ntlm_mod or the LDAP mod or something else?
Only Human
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Re:Integrating PHP and Windows Authentication

Post by Neo »

Popping this up after a while as I was wondering about this again.

Is there any way we can authenticate users using the information that must reside in an LDAP server or someplace else?
I mean where does the Windows Domain info reside?
Can we try to login to that domain from an app and then if it suceeds allow users to access the web page content or something like that?
Only Human
JoeKayzA

Re:Integrating PHP and Windows Authentication

Post by JoeKayzA »

Hi!

Maybe this could help? At least it shows how to log into an active directory server, but to retrieve info you should probably investigate in the directory structure of MS' AD-server.

cheers Joe
User avatar
Neo
Member
Member
Posts: 842
Joined: Wed Oct 18, 2006 9:01 am

Re:Integrating PHP and Windows Authentication

Post by Neo »

Thanks I am having a look at that.
I'm also wondering if there is a way I can do SMB authentication from PHP. There seems to be a php-smbauth, but am not sure if that is the answer.

Has anyone here some experience or info on this?
TIA
Only Human
Post Reply