From: Claudio Claudio Date: 2007-07-20T16:45:24+09:00 Subject: Re: problem doing find in ActiveLdap Kouhei Sutou wrote: > Hi, > > 2007/7/19, Claudio Claudio : > >> ActiveLdap::Base.establish_connection( >> :host => 'hostname', >> :bind_dn => 'cn=admin,ou=users,dc=company,dc=it', >> :base => 'ou=addressbooks,dc=company,dc=it', >> :password_block => 'admin' >> ) > > You need to pass Proc object to :password_block or use :password > with String. > >> class Addressbook < ActiveLdap::Base >> ldap_mapping :dn_attribute => 'cn', :prefix => 'ou=addressbooks' >> end > > In your configuration, you need to set :prefix to '' because you already > specify 'ou=addressbooks,dc=company,dc=it' as :base in > establish_connection. Or change :base to 'dc=company,dc=it' and keep > :prefix 'ou=addressbooks'. > > > Thanks, I follow your directive and i added this: pwb = Proc.new do |user| ActiveLdap::Command.read_password("[#{user}] Password: ") end ...and works like a charm!!!! Thanks a lot! -- Posted via http://www.ruby-forum.com/.