News and Announcements > General Discussion
[Solved] LDAP Password Change
(1/1)
sharbich:
Hello,
I would like to use the password plugin for LDAP in Roundcube. I have the following configuration in "config.inc.php":
--- Code: ---// Password Plugin options
// -----------------------
$config['password_driver'] = 'ldap_simple';
$config['password_confirm_current'] = true;
$config['password_minimum_length'] = 6;
// ----------------------------------
// LDAP and LDAP_SIMPLE Driver options
// -----------------------------------
$config['password_ldap_host'] = 'ldap.intern.example.com';
$config['password_ldap_port'] = '9009';
$config['password_ldap_starttls'] = false;
$config['password_ldap_version'] = 3;
$config['password_ldap_basedn'] = 'dc=example,dc=com';
$config['password_ldap_method'] = 'admin';
$config['password_ldap_adminDN'] = 'cn=admin,dc=example,dc=com';
$config['password_ldap_adminPW'] = '#############';
$config['password_ldap_userDN_mask'] = 'uid=%login,ou=users,dc=example,dc=com';
$config['password_ldap_searchDN'] = 'cn=admin,dc=example,dc=com';
$config['password_ldap_searchPW'] = '#############';
$config['password_ldap_search_base'] = 'ou=users,dc=example,dc=com';
$config['password_ldap_search_filter'] = '(uid=%login)';
$config['password_ldap_encodage'] = 'crypt';
$config['password_ldap_pwattr'] = 'userPassword';
$config['password_ldap_force_replace'] = true;
--- End code ---
Unfortunately I get the following error message after saving.
--- Code: ---Mai 14 10:37:28 dsme01 roundcube[32410]: PHP Warning: ldap_modify(): Modify: No such object in /var/www/html/roundcube/plugins/password/drivers/ldap_simple.php on line 90
--- End code ---
Do you have any idea what I did wrong?
I'm using Debian Buster and Roundcube version 1.4.8
Greetings from Stefan Harbich
alec:
Set ldap_debug=true in config to get some more info into the logs.
sharbich:
--- Code: ---Mai 14 12:31:43 dsme01 roundcube[25663]: <do5pm6ot> C: Connect to ldap.intern.exemple.com:9009
Mai 14 12:31:43 dsme01 roundcube[25663]: <do5pm6ot> S: OK
Mai 14 12:31:43 dsme01 roundcube[25663]: <do5pm6ot> C: Bind cn=admin,dc=exemple,dc=com, pass: **** [13]
Mai 14 12:31:43 dsme01 roundcube[25663]: <do5pm6ot> S: OK
Mai 14 12:31:43 dsme01 roundcube[25663]: <do5pm6ot> C: Modify uid=stefan.harbich@example.com,ou=users,dc=example,dc=com: Array
Mai 14 12:31:43 dsme01 roundcube[25663]: (
Mai 14 12:31:43 dsme01 roundcube[25663]: [userPassword] => {CRYPT}$1$65npTdBX$ESFsub5laHkDt6AMdhqDC1
Mai 14 12:31:43 dsme01 roundcube[25663]: )
Mai 14 12:31:43 dsme01 roundcube[25663]:
Mai 14 12:31:43 dsme01 roundcube[25663]: PHP Warning: ldap_modify(): Modify: No such object in /var/www/html/roundcube/plugins/password/drivers/ldap_simple.php on line 90
Mai 14 12:31:43 dsme01 roundcube[25663]: <do5pm6ot> S: No such object
--- End code ---
Okay, seems like the uid is wrong. This must actually be stefan.harbich. Without @example.com. Just why?
alec:
Try %name instead of %login.
sharbich:
--- Quote from: alec on May 14, 2021, 06:44:42 AM ---Try %name instead of %login.
--- End quote ---
That was the solution. Thanks.
Navigation
[0] Message Index
Go to full version