Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

roundcube password plugin

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
7 posts • Page 1 of 1
Author
Message
Elleni
Veteran
Veteran
Posts: 1298
Joined: Tue May 23, 2006 10:56 pm

roundcube password plugin

  • Quote

Post by Elleni » Mon Nov 18, 2019 1:28 am

I tried to activate said plugin for my working mailserver which was initially setup and database created by postfixadmin

Code: Select all

config['password_db_dsn'] = 'mysql://postfixadminuser:password@localhost/postfixadmin_database';

$config['password_query'] = 'UPDATE `mailbox` SET `password` = %c, WHERE `username` = %u';
changes done in plugins/passwort/config.inc.php.

Am I missing something?

Result: New password not be saved message when trying to change password in roundcube.
Top
freke
Veteran
Veteran
Posts: 1136
Joined: Thu Jan 23, 2003 3:17 pm
Location: Somewhere in Denmark
Contact:
Contact freke
Website

  • Quote

Post by freke » Mon Nov 18, 2019 4:05 pm

I haven't tried that plugin, but turning on logging in roundcube (/var/www/localhost/htdocs/roundcube/config/config.inc.php)

Code: Select all

// ----------------------------------
// LOGGING/DEBUGGING
// ----------------------------------
// system error reporting, sum of: 1 = log; 4 = show
$config['debug_level'] = 5;

// log driver:  'syslog', 'stdout' or 'file'.
$config['log_driver'] = 'syslog';
and adding password to array of plugins in same file

Code: Select all

// ----------------------------------
// PLUGINS
// ----------------------------------
// List of active plugins (in plugins/ directory)
$config['plugins'] = array('userinfo','password');
Gives me this error
PHP Error in /var/www/localhost/htdocs/roundcube/program/lib/Roundcube/rcube_plugin.php (157): Failed to load config from /var/www/localhost/htdocs/roundcube/plugins/password/config.inc.php
using the sample-config in the plugins/password dir.

I see there's a change-password USE-flag for Roundcube - you've tried emerging with that?

EDIT:
This was with roundcube-1.3.10 - found out that 1.4.0 was added to the tree and tried that (with change-password USE-flag) - now it seems to use the plugin-config - testing some more :)
Top
freke
Veteran
Veteran
Posts: 1136
Joined: Thu Jan 23, 2003 3:17 pm
Location: Somewhere in Denmark
Contact:
Contact freke
Website

  • Quote

Post by freke » Mon Nov 18, 2019 5:13 pm

I got it working for me with roundcube-1.4.0:

my plugins/password/config.inc.php

Code: Select all

<?php
$config['password_driver'] = 'sql';
$config['password_strength_driver'] = null;
$config['password_confirm_current'] = false;
$config['password_minimum_length'] = 0;
$config['password_minimum_score'] = 0;
$config['password_log'] = false;
$config['password_login_exceptions'] = null;
$config['password_hosts'] = null;
$config['password_force_save'] = false;
$config['password_force_new_user'] = false;
$config['password_algorithm'] = 'clear';
$config['password_algorithm_prefix'] = '';
$config['password_blowfish_cost'] = 12;
$config['password_disabled'] = false;
$config['password_username_format'] = '%u';
$config['password_crypt_hash'] = 'md5';
$config['password_idn_ascii'] = false;
$config['password_hash_algorithm'] = 'sha1';
$config['password_hash_base64'] = false;
$config['password_db_dsn'] = 'mysql://[user]:[password]@localhost/[DB]';
$config['password_query'] = 'UPDATE virtual_users SET fullname=%c WHERE email=%u LIMIT 1';
Much of which is probably default/not needed (but I just started with the config.inc.php.dist file)

and added password to the plugins-array in config/config.inc.php

I just tried this on a 'dummy' table (fullname) didn't wan't it to change my password :)
Top
Elleni
Veteran
Veteran
Posts: 1298
Joined: Tue May 23, 2006 10:56 pm

  • Quote

Post by Elleni » Fri Nov 22, 2019 5:07 pm

Hi, thanks for your comments. Unfortunatelly I cant do it correctly apparently.

I took your file, modified user, password and dbname so it matches my settings that I have in postfixadmin (which had created my database after all). Also replaced fullname with password and virtual_users with mailbox in the query line.

I dont get it, as

mysql -u user -p set in config.ini.php has (write-)access to the database

Code: Select all

MariaDB [dbname]> show tables;
+-----------------------+
| Tables_in_dbname  |
+-----------------------+
| admin                 |
| alias                 |
| alias_domain          |
| config                |
| domain                |
| domain_admins         |
| fetchmail             |
| log                   |
| mailbox               |
| quota                 |
| quota2                |
| vacation              |
| vacation_notification |
+-----------------------+
13 rows i[code]

MariaDB [dbname]> show columns from dbname.mailbox;
+------------+--------------+------+-----+---------------------+-------+
| Field      | Type         | Null | Key | Default             | Extra |
+------------+--------------+------+-----+---------------------+-------+
| username   | varchar(255) | NO   | PRI | NULL                |       |
| password   | varchar(255) | NO   |     | NULL                |       |
| name       | varchar(255) | NO   |     | NULL                |       |
| maildir    | varchar(255) | NO   |     | NULL                |       |
| quota      | bigint(20)   | NO   |     | 0                   |       |
| local_part | varchar(255) | NO   |     | NULL                |       |
| domain     | varchar(255) | NO   | MUL | NULL                |       |
| created    | datetime     | NO   |     | 2000-01-01 00:00:00 |       |
| modified   | datetime     | NO   |     | 2000-01-01 00:00:00 |       |
| active     | tinyint(1)   | NO   |     | 1                   |       |
+------------+--------------+------+-----+---------------------+-------+
10 rows in set (0.01 sec)
n set (0.00 sec)[/code]

The query in the config.ini.php is:

Code: Select all

$config['password_query'] = 'UPDATE mailbox SET password=%c WHERE email=%u LIMIT 1';
When trying to change password in roundcube plugin, the result is always the same. I just get a message in roundcube that the password was not changed :oops:

Is there any debug logging, that I could activate in order to find out whats going on?
Top
freke
Veteran
Veteran
Posts: 1136
Joined: Thu Jan 23, 2003 3:17 pm
Location: Somewhere in Denmark
Contact:
Contact freke
Website

  • Quote

Post by freke » Fri Nov 22, 2019 8:52 pm

You can try adding:

Code: Select all

// system error reporting, sum of: 1 = log; 4 = show
$config['debug_level'] = 5;

// Log SQL queries
$config['sql_debug'] = true;

// log driver:  'syslog', 'stdout' or 'file'.
$config['log_driver'] = 'syslog';

To your roundcube/config/config.inc.php

EDIT:
How are your usernames stored in the database ie. is it johndoe@example.com or just johndoe? (would translate to %u or %l - I guess)
Top
Elleni
Veteran
Veteran
Posts: 1298
Joined: Tue May 23, 2006 10:56 pm

  • Quote

Post by Elleni » Thu Nov 28, 2019 10:47 pm

Hey Freke,

its username@domain.com :D
Top
Elleni
Veteran
Veteran
Posts: 1298
Joined: Tue May 23, 2006 10:56 pm

  • Quote

Post by Elleni » Mon Dec 23, 2019 9:33 pm

What would be the correct query in that case? Nothing I tried worked.
Top
Post Reply

7 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic