Advertisement

10.08.2008 at 08:34AM PDT, ID: 23797728 | Points: 500
[x]
Attachment Details

how can I use php to get the DN from the samaccountname from AD

Asked by clwehunt in PHP Scripting Language, Lightweight Directory Access Protocol (LDAP), Active Directory

Tags: , ,

I am trying to find out the best way to get a users DN, when provided with their samaccountname using php and Active Directory.

I have tried

$filter="samaccountname=" . $_POST['username'];
$sr = ldap_search($ldapconn, 'DC=star, DC=com', $filter);

When you dump $sr you get FALSE.

Any ideas?Start Free Trial
[+][-]10.08.2008 at 06:35PM PDT, ID: 22674986

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.08.2008 at 06:38PM PDT, ID: 22674995

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.09.2008 at 06:39AM PDT, ID: 22678226

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.09.2008 at 06:12PM PDT, ID: 22683734

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.14.2008 at 06:42AM PDT, ID: 22711176

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.15.2008 at 05:42PM PDT, ID: 22727182

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 - Hierarchy / EE_QW_2_20070628