1

Topic: roundcube 0.2.1 password change

Hi,

Is the password on the roundcube a plugin?  I can't seem to find it.  Maybe it is hard coded to the code?

I managed to upgrade roundcube to 0.3.1 and got the sieverules and webcalender working.  I can't seem to get the password plugin working.  I thought I can peek at the 0.2.1 code but no such luck.  Ldap is a new beast to me and I have limited understanding of it.  Here is the error message:

roundcube: Bind failed: Invalid credentials: LDAP_INVALID_CREDENTIALS (49):

Here is part of the config.inc.php under password:

// LDAP Driver options
// -------------------
// LDAP server name to connect to.
// You can provide one or several hosts in an array in which case the hosts are tried from left
to right.
// Exemple: array('ldap1.exemple.com', 'ldap2.exemple.com');
// Default: 'localhost'
$rcmail_config['password_ldap_host'] = 'localhost';

// LDAP server port to connect to
// Default: '389'
$rcmail_config['password_ldap_port'] = '389';

// TLS is started after connecting
// Using TLS for password modification is recommanded.
// Default: false
$rcmail_config['password_ldap_starttls'] = false;

// LDAP version
// Default: '3'
$rcmail_config['password_ldap_version'] = '3';

// LDAP base name (root directory)
// Exemple: 'dc=exemple,dc=com'
$rcmail_config['password_ldap_basedn'] = 'domainName=%domain,o=domains,dc=phys,dc=hawaii,dc=edu'
;

// LDAP connection method
// There is two connection method for changing a user's LDAP password.
// 'user': use user credential (recommanded, require password_confirm_current=true)
// 'admin': use admin credential (this mode require password_ldap_adminDN and password_ldap_admi nPW)
// Default: 'user'
$rcmail_config['password_ldap_method'] = 'user';

// LDAP Admin DN
// Used only in admin connection mode
// Default: null
$rcmail_config['password_ldap_adminDN'] = null;

// LDAP Admin Password
// Used only in admin connection mode
// Default: null
$rcmail_config['password_ldap_adminPW'] = null;

// LDAP user DN mask
// The user's DN is mandatory and as we only have his login,
// we need to re-create his DN using a mask
// '%login' will be replaced by the current roundcube user's login
// '%name' will be replaced by the current roundcube user's name part
// '%domain' will be replaced by the current roundcube user's domain part
// Exemple: 'uid=%login,ou=people,dc=exemple,dc=com'
$rcmail_config['password_ldap_userDN_mask'] = 'mail=%login@%domain,ou=Users,domainName=%domain,o
=domains,dc=phys,dc=hawaii,dc=edu';

// LDAP password hash type
// Standard LDAP encryption type which must be one of: crypt,
// ext_des, md5crypt, blowfish, md5, sha, smd5, ssha, or clear.
// Please note that most encodage types require external libraries
// to be included in your PHP installation, see function hashPassword in drivers/ldap.php for mo
re info.
// Default: 'crypt'
$rcmail_config['password_ldap_encodage'] = 'ssha';

// LDAP password attribute
// Name of the ldap's attribute used for storing user password
// Default: 'userPassword'
$rcmail_config['password_ldap_pwattr'] = 'userPassword';

// LDAP password force replace
// Force LDAP replace in cases where ACL allows only replace not read
// See http://pear.php.net/package/Net_LDAP2/d … hodreplace
// Default: true
$rcmail_config['password_ldap_force_replace'] = true;


Looks it doesn't bind correctly to the ldap server.  I know it is running because I can login to roundtube and emails are being delivered.  Thank you.

Ze

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: roundcube 0.2.1 password change

$rcmail_config['password_ldap_userDN_mask'] = 'mail=%login@%domain,ou=Users,domainName=%domain,o
=domains,dc=phys,dc=hawaii,dc=edu';

Change %login to %name, and then it should work as expected.

3 (edited by ze 2009-12-06 04:07:56)

Re: roundcube 0.2.1 password change

Yes, that work with the default crypt.  If I change it to ssha, it doesn't work.  I got a error message saying can not save new passowrd, encrypt function missing.  I can't find anything in the mailllog.  Any ideas?  Thank you.

4

Re: roundcube 0.2.1 password change

Why don't you read apache error log?
If you use SSHA, php-mhash is required.

5

Re: roundcube 0.2.1 password change

There is nothing in the apache error log.  Roundcube logs goes to the mail syslog facility.
I have the php-mhash installed on the system.  Maybe I should stick with md5 encryption till the password works without the Net/LDAP2.    I have to upgrade the pear to >1.5.0 and then install Net/LDAP2 pear package.  It was a pain.

[root@hepsva httpd]# rpm -qa | grep php-mhash
php-mhash-5.1.6-15.el5.centos.1
[root@hepsva httpd]# rpm -qi php-mhash
Name        : php-mhash                    Relocations: (not relocatable)
Version     : 5.1.6                             Vendor: CentOS
Release     : 15.el5.centos.1               Build Date: Thu 27 Mar 2008 07:29:40 AM HST
Install Date: Sat 05 Dec 2009 09:46:27 AM HST      Build Host: builder10.centos.org
Group       : Development/Languages         Source RPM: php-extras-5.1.6-15.el5.centos.1.src.rpm
Size        : 9643                             License: The PHP License
Signature   : DSA/SHA1, Thu 27 Mar 2008 07:44:13 AM HST, Key ID a8a447dce8562897
URL         : http://www.php.net/
Summary     : Standard PHP module provides mhash support
Description :
Standard PHP module provides mhash support

ZhangHuangbin wrote:

Why don't you read apache error log?
If you use SSHA, php-mhash is required.

6

Re: roundcube 0.2.1 password change

Since official password plugin of roundcube requires Net_LDAP2, you have to upgrade php-pear on RHEL/CentOS.
Reference: http://www.iredmail.org/forum/post1247.html#p1247

Please do SEARCH before asking smile

7

Re: roundcube 0.2.1 password change

Hi,

I did upgrade it.  The ssha encryption doesn't work for me.  I am not sure if I missing some packages of the encyption routine since I stripped down all of the i386 packages from the system.  Maybe I will put it on openvz and track it down further with the default mininimum centos 5.3 install.

[root@hepsva iRedMail-0.5.1]# pear list
Installed packages, channel pear.php.net:
=========================================
Package          Version State
Archive_Tar      1.3.3   stable
Console_Getopt   1.2.3   stable
Net_LDAP2        2.0.7   stable
PEAR             1.9.0   stable
Structures_Graph 1.0.3   stable
XML_RPC          1.5.0   stable
XML_Util         1.2.1   stable

The log doesn't tell me anything.   I went over the code and can't seem to find what encryption is required beside the mhash.
Thank you.

Ze

ZhangHuangbin wrote:

Since official password plugin of roundcube requires Net_LDAP2, you have to upgrade php-pear on RHEL/CentOS.
Reference: http://www.iredmail.org/forum/post1247.html#p1247

Please do SEARCH before asking smile

8

Re: roundcube 0.2.1 password change

Works for me here with php-mhash installed. smile

9

Re: roundcube 0.2.1 password change

ZhangHuangbin wrote:

Works for me here with php-mhash installed. smile

Ok, thank you very much for the help.  I will setup a vz container and do some tests.