Author Topic: Password plugin configuration problem  (Read 12206 times)

Offline raj123

  • Jr. Member
  • **
  • Posts: 10
Password plugin configuration problem
« on: December 01, 2015, 02:31:54 AM »
version Roundcube Webmail 1.0.6
echo command is working however none of the config mentioned above are working as i get could not save new password.

Offline raj123

  • Jr. Member
  • **
  • Posts: 10
Re: Password plugin configuration problem
« Reply #1 on: December 01, 2015, 02:35:21 AM »
this is my roundcubemail error log
DB Error: [1305] FUNCTION roundcube.update_passwd does not exist (SQL Query: SELECT update_passwd('$1$UnVXzbFq$ezAv0hatBeMkfv5tACyog1', 'amy')) in /usr/share/roundcubemail/program/lib/Roundcube/rcube_db.php on line 467 (POST /roundcubemail/?_task=settings&_action=plugin.password-save?_task=&_action=)
plz plz help would be appriciated

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Password plugin configuration problem
« Reply #2 on: December 01, 2015, 02:44:22 PM »
You need to configure the password plugin to work with your environment, read the README in the password plugin folder.

Offline raj123

  • Jr. Member
  • **
  • Posts: 10
Re: Password plugin configuration problem
« Reply #3 on: December 01, 2015, 10:33:06 PM »
i have system user as my email users and i read the config file and did like that but still error could not save password
i have already tried all the above config settings but still same log error i have posted above.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Password plugin configuration problem
« Reply #4 on: December 02, 2015, 02:13:39 AM »
It doesn't sound like you have, you've said that your mail server is using system but the error clear shows that the password plugin is configured to try to change password in a database. Every mail server is different and you have to know your environment to be able to use the password plugin. Please keep your posts about the problem in one thread, otherwise its very confusing.

Offline raj123

  • Jr. Member
  • **
  • Posts: 10
Re: Password plugin configuration problem
« Reply #5 on: December 02, 2015, 02:24:43 AM »
i have postfix dovecot and roundcubemail i have just changed some settings under password config.inc.php
$config['password_driver'] = 'sql';
$config['password_confirm_current'] = true;
$config['password_minimum_length'] = 8;
$config['password_require_nonalpha'] = false;
$config['password_log'] = false;
$config['password_login_exceptions'] = null;
$config['password_hosts'] = array('localhost');
$config['password_force_save'] = true;

// SQL Driver options
$config['password_db_dsn'] = 'mysql://user:pass@localhost/roundcube';

// SQL Update Query with encrypted password using random 8 character salt
$config['password_query'] = 'UPDATE users SET crypt=ENCRYPT(%p,CONCAT(_utf8\'$5$\',RIGHT(MD5(RAND()),8),_utf8\'$\')) WHERE id=%u LIMIT 1';

mysql -u root -p
mysql > GRANT SELECT,UPDATE ON roundcube.users TO 'roundcube'@'localhost';
mysql > FLUSH PRIVILEGES;
mysql > quit
now i have error as below
[02-Dec-2015 18:53:50 +0545]: DB Error: SQLSTATE[28000] [1045] Access denied for user 'roundcube'@'localhost' (using password: YES) in /usr/share/roundcubemail/program/lib/Roundcube/rcube_db.php on line 158 (POST /roundcubemail/?_task=settings&_action=plugin.password-save?_task=&_action=)
Pls suggest me thank you  :'(
« Last Edit: December 02, 2015, 03:03:38 AM by raj123 »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Password plugin configuration problem
« Reply #6 on: December 02, 2015, 02:40:42 AM »
Is the password_db_dsn pointing to the mail server database? It shouldn't be pointing to the Roundcube database. If it is pointing to the mail server database make sure that the database user is allowed to access the mail server database right now according to the error log it can't.

Offline raj123

  • Jr. Member
  • **
  • Posts: 10
Re: Password plugin configuration problem
« Reply #7 on: December 02, 2015, 10:39:11 PM »
the database i have is only mysql and roundcube and i am confused which one is used by mail server since i have my system users who uses emails and i did useradd from terminal to add my users .
by the way which driver should i be using?? is it chpasswd or sql i used chpasswd before but i had which i have written u about so i chaned drvier to sql and now this error and can you please clearify which db should i be using for mail server???
i am just an amateur learner here. thankyou a lot skaero.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Password plugin configuration problem
« Reply #8 on: December 03, 2015, 12:58:43 AM »
If all of your mail users are linux system uses they most likely not stored in a mysql database (unless your using some sort or global server authentication.) So assuming that your system accounts are 100% standard you most likely want the pam driver.

Offline raj123

  • Jr. Member
  • **
  • Posts: 10
Re: Password plugin configuration problem
« Reply #9 on: December 03, 2015, 01:48:52 AM »
can you plz guide me to the link if you have or the settings that i need to make change on ?? if i am to use this pam driver coz i made change on driver with pam but no solution.

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Password plugin configuration problem
« Reply #10 on: December 03, 2015, 01:56:02 PM »
The pam driver requires the PECL's PAM extension to be installed (http://pecl.php.net/package/PAM). I haven't used the pam driver before so I'm sure if any other configuration is needed.

Offline raj123

  • Jr. Member
  • **
  • Posts: 10
Re: Password plugin configuration problem
« Reply #11 on: December 06, 2015, 02:17:28 AM »
is there any one who have used pam driver to change password plugin in roundcubemail??
can you please share the setting you have made with this driver???

Offline raj123

  • Jr. Member
  • **
  • Posts: 10
Re: Password plugin configuration problem
« Reply #12 on: December 06, 2015, 11:40:26 PM »
This driver is for changing passwords of shell users authenticated with PAM.
Requires PECL's PAM exitension to be installed (http://pecl.php.net/package/PAM).
i have downloaded and changed my /password/config.inc.php
$config['password_driver'] = 'pam';
$config['password_db_dsn'] = '';
$config['password_query'] = 'SELECT update_passwd(%c, %u)';
but the error is still   DB Error: [1305] FUNCTION roundcube.update_passwd does not exist (SQL Query: SELECT update_passwd('$1$LEc3zwSF$EMOcILg8tZ1bG/LZrIEJx0', 'amy')) in /usr/share/roundcubemail/program/lib/Roundcube/rcube_db.php on line 467 (POST /roundcubemail/?_task=settings&_action=plugin.password-save?_task=&_action=)
now i am really furstated that there is not solution i could find  i have already tried with chpasswd with all the googleed documents.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Re: Password plugin configuration problem
« Reply #13 on: December 07, 2015, 04:09:11 AM »
That message would suggest that you are changing the wrong config file. I say that because the error message is from the SQL driver, not the PAM one. Did you remove the `.dist` from the end oft he config file name?

BTW are you running a version of RC you installed yourself from source or a package like the one from Debian? Because packages, might put the config files in difference places, you'd have to check the info that came with that package to see.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦

Offline raj123

  • Jr. Member
  • **
  • Posts: 10
Re: Password plugin configuration problem
« Reply #14 on: December 07, 2015, 10:59:01 PM »
yes i removed .dst file and btw i install it from epel repo. any suggestion or help would be highly appreciated.