cross
New Foswiki release 2.1.6 is available with important security fixes.
Sourceforge foswiki email lists being discontinued. Subscribe to the new Foswiki announce and discuss lists at MailingLists
This question about LDAP: Answered

Cannot get info from AD

I am using LdapContrib plugin to authenticate users on our Active Directory. This works great.

What I want to use LdapNgPlugin for is to create a Telephone List generated from the Active Directory data as a topic. I have tried the following:
%LDAP{
  "(objectClass=user)"
  base="(OU=users,OU-Sasolburg)" 
  limit="100" 
  cache="3600" 
  header="| Nr | Name | Mail | Telephone |$n" 
  format="| $index | $cn | $mail | $telephoneNumber |"
}%
| Nr | Name | Mail | Telephone |

%LDAPUSERS{limit="100"}%

and got the results:

ERROR: 34: 0000208F: NameErr: DSID-031001BA, problem 2006 (BAD_NAME), data 8350, best match of: 'OU=users,OU-Sasolburg,DC=karbochem,DC=co,DC=za'
Nr    Name    Mail    Telephone
Main.HeinrichVermeulen

Note that my LocalSite.cfg settings are defined here.

What am i doing wrong?

-- HeinrichVermeulen - 25 Sep 2013

Your base is wrong. Remove the brackets. Try OU=users,OU-Sasolburg,DC=karbochem,DC=co,DC=za as the error message suggests.

-- MichaelDaum - 25 Sep 2013

Ok, so that was a duh moment! Thanks for pointing that out. Obviously is works like a charm. Thanks Michael.

-- HeinrichVermeulen - 25 Sep 2013

Can't seem to sort properly. Tried to include sort="displayName" but does not sort at all. Any suggestions?

-- HeinrichVermeulen - 25 Sep 2013

Also: if a attribute does not exist in the AD, it returns the name of the attribute e.g. if $mobile is used to get the mobile number, and it does not exist for a particular user, the text "$mobile" is inserted instead of the expected "" How can I change this behaviour to return ""?

-- HeinrichVermeulen - 25 Sep 2013

Have a look at the clear param.

Check out the examples.

-- MichaelDaum - 25 Sep 2013

The 'clear' parameter seemed to do the trick. Thanks

 

QuestionForm edit

Subject LDAP
Extension LdapNgPlugin
Version Foswiki 1.1.8
Status Answered
Related Topics
Topic revision: r6 - 01 Oct 2013, HeinrichVermeulen - This page was cached on 24 Jun 2018 - 03:56.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy