Im running the latest ActiveLDAP 0.8. My problem is the following
Ok, its simple.
This works:
xxxcatalog# ldapsearch -x -h 192.168.1.40 -W -D
‘cn=Manager,dc=webgate,dc=net,dc=au’ -b ‘dc=webgate,dc=net,dc=au’
‘(dc=www)’
Enter LDAP Password:
extended LDIF
LDAPv3
base <dc=webgate,dc=net,dc=au> with scope subtree
filter: (dc=www)
requesting: ALL
www, lemra, com, domains, webgate.net.au
dn: dc=www,dc=lemra,dc=com,ou=domains,dc=webgate,dc=net,dc=au
dc: www
objectClass: top
objectClass: dcObject
objectClass: dNSDomain
aRecord: 192.168.1.1
search result
search: 2
result: 0 Success
numResponses: 2
numEntries: 1
Ive got a ruby script to test ActiveLDAP to establish connection with
the server:
require ‘rubygems’
require ‘active_ldap’
ActiveLDAP::Base.connect(
:host => ‘192.168.1.40’,
:port => 389,
:base => ‘dc=webgate,dc=net,dc=au’,
:bind_format => ‘cn=Manager,dc=webgate,dc=net,dc=au’,
:password_block => Proc.new { ‘xxxx’ },
:allow_anonymous => false,
:try_sasl => false
)
but i get this:
xxxcatalog# ruby ldaptest.rb
/usr/pkg/lib/ruby/gems/1.8/gems/ruby-activeldap-0.8.0/lib/active_ldap.rb:947:
warning: already initialized constant VERSION
/usr/pkg/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:100:in
const_missing': uninitialized constant ActiveLDAP (NameError) from /usr/pkg/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:131:in
const_missing’
from ldaptest.rb:4
Has anyone got any clues please?
Petr