Single sign on with AD in php application with apache
I am creating an internal web appliation with Single sign on with the AD authentication so that users dont have to enter login credintials again. Currently, I configured samba,winbind, nsswitch files and added the machine as a member server of the AD. Now, I can authenticate users from that machine, for example:
# ntlm_auth --username=william
& get this output "NT_STATUS_OK: Success (0x0)"
Also, 'wbinfo -u' and 'wbinfo -g' shows the users and groups.
Now, I want my php developed application to just fetch the login username. How to do that? I currently got lost in configuring php & apache for this purpose. Have no idea whether anything else is required or something in my configuration is wrong? If anybody ever did this before can please sort out the way for me.
Thanks in advance.