Cactiusers.org


It is currently Tue Feb 07, 2012 6:02 pm




Post new topic Reply to topic  [ 3 posts ] 
 LDAP Search Error: Unable to find users DN 
Author Message
New User

Joined: Thu Jun 11, 2009 7:53 am
Posts: 11
Post LDAP Search Error: Unable to find users DN
hi,

i'm trying to get LDAP working with my Windows 200 domain and have made some progress but am still getting this error

Warning: ldap_search() [function.ldap-search]: Search: Bad search filter in /var/www/html/lib/ldap.php on line 432
LDAP Search Error: Unable to find users DN

running CactiEZ 0.8.7c

Quote:
Cacti Version - 0.8.7c
Plugin Architecture - 2.2
Poller Type - Cactid v
Server Info - Linux 2.6.9-78.0.13.ELsmp
Web Server - Apache/2.0.63 (CentOS)
PHP - 5.1.6
PHP Extensions - libxml, xml, wddx, tokenizer, sysvshm, sysvsem, sysvmsg, standard, SimpleXML, sockets, SPL, shmop, session, Reflection, pspell, posix, mime_magic, iconv, hash, gmp, gettext, ftp, exif, date, curl, ctype, calendar, bz2, zlib, pcre, openssl, apache2handler, gd, ldap, mysql, mysqli, PDO, pdo_mysql, pdo_sqlite, snmp, eAccelerator
MySQL - 5.0.68
RRDTool - 1.2.23
SNMP - 5.1.2
Plugins
    Global Plugin Settings (settings - v0.5)
    Large Site Performane Booster for Cacti (boost - v2.2)
    Device Monitoring (monitor - v0.8.2)
    Network Discovery (discovery - v0.8.5)
    Network Tools (tools - v0.3)
    Syslog Monitoring (syslog - v0.5.2)
    Device Tracking (mactrack - v1.1)
    Login Page Mod (loginmod - v1.0)
    Update Checker (update - v0.4)
    FlowView (flowview - v0.6)
    Host Info (hostinfo - v0.2)
    Error Images (errorimage - v0.1)
    PHP Network Weathermap (weathermap - v0.95b)
    docs
    Cacti-ReportIt (reportit - v0.6.1)
    Router Configs (routerconfigs - v0.1)
    WMI Query (wmi - v0.1)
    Realtime for Cacti (realtime - v0.35)
    PHP Network Managing (PHP Network Managing - v0.6.1)
    IP subnet Calculator IPv4 IPv6 (ipsubnet - v.4d)



my settings as follows:
Server: myserver fqdn (can ping this from cacti shell)
Port Standard: 389
Protocol Version: (tried version 2 and 3)
Encryption: None
Referrals: Disabled
Mode: Specific Searching (all other options fail with can't connect to LDAP)
Distinguished Name (DN): "<username>@domainname.com" - should need this anyway
Search Base: "OU=MyOU,OU=MyOU1,OU=MyOU2,OU=MyOU3,DC=domainname,DC=com"
Search Filter: "(&(objectclass=user)(objectcategory=user)(userPrincipalName=<username>*))"
Search Distingished Name (DN): tried the following
username
CN=acccountname,OU=MyOU,OU=MyOU2,DC=domain,DC=com
username@domainname.com - had seen post saying to use primay suffix name for user
Search Password: password


Have seen a post saying that quote was left out of line in ldap.php file

function cacti_ldap_search_dn($username,$ldap_dn
have changed to
function cacti_ldap_search_dn($username ="",$ldap_dn

still made no difference.

I have tried about every combination of values for the different fields i need to fill in and i think they should be fine as i have seen many error messages before this relating to not connecting to LDAP and i have got past these.
Is there any bug still in the script that is stopping this from working?

this is the output of my cacti log:

cat /var/www/html/log/cacti.log | grep LDAP
08/09/2009 01:23:44 PM - AUTH LDAP_SEARCH: Unable to find users DN
08/09/2009 01:23:44 PM - AUTH LOGIN: LDAP Error: Unable to find users DN

hoping someone has came across this before.

thanks


Sun Aug 09, 2009 2:57 pm
New User

Joined: Sun Aug 09, 2009 1:56 pm
Posts: 4
Post Re: LDAP Search Error: Unable to find users DN
When you say Windows 200(0) domain, do you mean running cacti on a Windows 2K box and trying to bind it to an OpenLDAP server?

UPDATE

Hope this link helps, figured you were authing to AD and not LDAP itself.

http://forums.cacti.net/about23948-0-asc-0.html


Sun Aug 09, 2009 3:02 pm
New User

Joined: Thu Jun 11, 2009 7:53 am
Posts: 11
Post Re: LDAP Search Error: Unable to find users DN
yes i'm trying to connect to a windows 2000 domain controller from my cacti box running freebsd (or whatever flavour the cactiEZ iso comes with).
i seen that post and although it helped me out somewhat it hasn't solved my main error.
i've checked the logs of my w2k dc and the attempt is getting there so it must be something to do with reading the search base.
my secuirty logs show:

Event Type: Success Audit
Event Source: Security
Event Category: Logon/Logoff
Event ID: 538
Date: 8/10/2009
Time: 2:47:24 PM
User: domain\user
Computer: DC
Description:
User Logoff:
User Name: user
Domain: domain
Logon ID: (0x1,0x7DA176B7)
Logon Type: 3

Event Type: Success Audit
Event Source: Security
Event Category: Logon/Logoff
Event ID: 540
Date: 8/10/2009
Time: 2:47:24 PM
User: domain/user
Computer: DC
Description:
Successful Network Logon:
User Name: username
Domain: domainname
Logon ID: (0x1,0x7DA176B7)
Logon Type: 3
Logon Process: Advapi
Authentication Package: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
Workstation Name: DC

any help appreciated!


Mon Aug 10, 2009 9:06 am
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for: