[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: some thoughts about RDN



To not spam to much this list i've pasted roundcube webmail LDAP part here
http://pastebin.com/m6ba78ab4

and below problematic part

------------------------------------
  'user_specific' => true,   // If true the base_dn, bind_dn and bind_pass
  //                            default to the user's IMAP login.
  // %fu - The full username provided, assumes the username is an email
  //       address, uses the username_domain value if not an email address.
  // %u  - The username prior to the '@'.
  // %d  - The domain name after the '@'.
  'base_dn'       => '',
  'bind_dn'       => '',
  'bind_pass'     => '',
-------------------------------------

so if i do not define bind_dn it defaults to user mail (user@example.com)
if bind_pass is not defined it defaults to password which user used to
login to mailbox

my example LDAP tree for private addressbook

ou=addressbook,cn=Johny Cash,ou=people,dc=example,dc=com
he has that attributes
mail=johny@example.com
userpassword=testpassword

so if i tried this configuration:

  'base_dn'       => 'ou=addressbook,mail=%fu,ou=people,dc=example,dc=com',
  'bind_dn'       => 'mail=%fu,ou=people,dc=example,dc=com',

it do not work and in log i have

-----------------------------------
Jun 10 12:27:45 eleanor slapd[8132]: conn=17 fd=14 ACCEPT from
IP=127.0.0.1:36004 (IP=0.0.0.0:389)
Jun 10 12:27:45 eleanor slapd[8132]: conn=17 op=0 BIND
dn="mail=johny@example.com,ou=people,dc=example,dc=com" method=128
Jun 10 12:27:45 eleanor slapd[8132]: conn=17 op=0 RESULT tag=97 err=49
text=
Jun 10 12:27:45 eleanor slapd[8132]: conn=17 op=1 UNBIND
Jun 10 12:27:45 eleanor slapd[8132]: conn=17 fd=14 closed
----------------------------------

I have no idea if this is possible to work, and do you?

Thanks and Greets
Pawel