Jump to content

LDAP - get active directory username


eludlow

Recommended Posts

Chaps,

Is there a simple way that PHP can retrieve (guessing with LDAP??) the username of a user viewing a page?

Basically, am running a network, and AD pops up a php file when users log on, prompting them to download a file, which is locally hosted.  I simply want to get the username of the domain user, and then append it to the end of a file, so I have a list of all users who have downloaded the file.

LDAP is something I've been meaning to read up on for a while - but realised I'm supposed to have this script implemented by tomorrow morning - I see a fun evening VPNing onto the work network :(

Many thanks in advance,
Ed Ludlow
Link to comment
https://forums.phpfreaks.com/topic/35246-ldap-get-active-directory-username/
Share on other sites

Thanks.

I've just realised that wasn't a very clear account of what I'm trying to do, sorry!

What happens is...
A user logs onto an active directory domain.  When they log on, a PHP file opens in a browser window (all done through group policies) which then asks users to download a certain file.  What I am wondering is if PHP can get the user's AD username, and then with that I can write it to a log file so I know which domain users have downloaded the file.

Hope that makes more sense!

Thanks,
Ed Ludlow
UNLESS you mean (when you refer to running a network) the login page that you'd get if you set a password on Windows itself, not just a general web-based login screen or HTTP auth? If that's the case, I'm really not sure it's possible due to permissions looking at/reading the local filesystem.

am i missing the point totally?

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.