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’.
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!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.