Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: gotspatel on March 06, 2021, 09:38:38 AM

Title: Roundcube 1.4.11 on IIS Win server 2019, Hmailserver Password plugin problem
Post by: gotspatel on March 06, 2021, 09:38:38 AM
Hi,

I am getting this error in changing the password. DB Error: [1305] FUNCTION roundcubemail.update_passwd does not exist (SQL Query: SELECT update_passwd('HASHED PASSWORD', '[email protected]')) in \\MAILSRV.DOMAIN.COM\C$\inetpub\wwwroot\roundcube\program\lib\Roundcube\rcube_db.php on line 543 (POST /?_task=settings&_action=plugin.password-save)

From what I have checked here are my config details.

PHP.ini
com.allow_dcom = true
extension=php_com_dotnet.dll


Password Plugin Config


// Password Plugin options
// -----------------------
// A driver to use for password change. Default: "sql".
// See README file for list of supported driver names.
$config['password_driver'] = 'hmail';

// A driver to use for checking password strength. Default: null (disabled).
// See README file for list of supported driver names.
$config['password_strength_driver'] = null;

// Determine whether current password is required to change password.
// Default: false.
$config['password_confirm_current'] = false;

// Require the new password to be a certain length.
// set to blank to allow passwords of any length
$config['password_minimum_length'] = 8;

// Require the new password to have at least the specified strength score.
// Note: Password strength is scored from 1 (week) to 5 (strong).
$config['password_minimum_score'] = 3;

// Enables logging of password changes into logs/password
$config['password_log'] = true;

// Comma-separated list of login exceptions for which password change
// will be not available (no Password tab in Settings)
$config['password_login_exceptions'] = null;

// Array of hosts that support password changing.
// Listed hosts will feature a Password option in Settings; others will not.
// Example: array('mail.example.com', 'mail2.example.org');
// Default is NULL (all hosts supported).
$config['password_hosts'] = null;

// Enables saving the new password even if it matches the old password. Useful
// for upgrading the stored passwords after the encryption scheme has changed.
$config['password_force_save'] = false;

// Enables forcing new users to change their password at their first login.
$config['password_force_new_user'] = false;

// Default password hashing/crypting algorithm.
// Possible options: des-crypt, ext-des-crypt, md5-crypt, blowfish-crypt,
// sha256-crypt, sha512-crypt, md5, sha, smd5, ssha, ssha512, samba, ad, dovecot, clear.
// For details see password::hash_password() method.
$config['password_algorithm'] = 'clear';

// Password prefix (e.g. {CRYPT}, {SHA}) for passwords generated
// using password_algorithm above. Default: empty.
$config['password_algorithm_prefix'] = '';

// Iteration count parameter for Blowfish-based hashing algo.
// It must be between 4 and 31. Default: 12.
// Be aware, the higher the value, the longer it takes to generate the password hashes.
$config['password_blowfish_cost'] = 12;

// Number of rounds for the sha256 and sha512 crypt hashing algorithms.
// Must be at least 1000. If not set, then the number of rounds is left up
// to the crypt() implementation. On glibc this defaults to 5000.
// Be aware, the higher the value, the longer it takes to generate the password hashes.
//$config['password_crypt_rounds'] = 50000;

// This option temporarily disables the password change functionality.
// Use it when the users database server is in maintenance mode or sth like that.
// You can set it to TRUE/FALSE or a text describing the reason
// which will replace the default.
$config['password_disabled'] = false;

// Various drivers/setups use different format of the username.
// This option allows you to force specified format use. Default: '%u'.
// Supported variables:
//     %u - full username,
//     %l - the local part of the username (in case the username is an email address)
//     %d - the domain part of the username (in case the username is an email address)
// Note: This may no apply to some drivers implementing their own rules, e.g. sql.
$config['password_username_format'] = '%u';

// By default the crypt() function which is used to create the %c
// parameter uses the md5 algorithm (deprecated, use %P).
// You can choose between: des, md5, blowfish, sha256, sha512.
$config['password_crypt_hash'] = 'blowfish';

// By default domains in variables are using unicode.
// Enable this option to use punycoded names
$config['password_idn_ascii'] = false;

// Using a password hash for %n and %q variables (deprecated, use %P).
// Determine which hashing algorithm should be used to generate
// the hashed new and current password for using them within the
// SQL query. Requires PHP's 'hash' extension.
$config['password_hash_algorithm'] = 'sha1';

// You can also decide whether the hash should be provided
// as hex string or in base64 encoded format.
$config['password_hash_base64'] = false;
// hMail Driver options
// -----------------------
// Remote hMailServer configuration
// true:  HMailserver is on a remote box (php.ini: com.allow_dcom = true)
// false: Hmailserver is on same box as PHP
$config['hmailserver_remote_dcom'] = false;
// Windows credentials
$config['hmailserver_server'] = array(
    'Server'   => '127.0.0.1',      // hostname or ip address
    'Username' => 'administrator',  // windows username
    'Password' => 'PASSWORD'        // windows user password
);
Title: Re: Roundcube 1.4.11 on IIS Win server 2019, Hmailserver Password plugin problem
Post by: alec on March 06, 2021, 12:13:53 PM
The error suggests that the default sql driver is being used. Did you create config.inc.php file in the plugin config? Is it readable for the http server?
Title: Re: Roundcube 1.4.11 on IIS Win server 2019, Hmailserver Password plugin problem
Post by: gotspatel on March 06, 2021, 10:55:06 PM
Quote from: alec on March 06, 2021, 12:13:53 PM
The error suggests that the default sql driver is being used. Did you create config.inc.php file in the plugin config? Is it readable for the http server?

Yes I have created the config.inc.php with the settings as show.

\\Is it readable for the http server?\\
I am sorry Don't know how to check it, please advise.

Title: Re: Roundcube 1.4.11 on IIS Win server 2019, Hmailserver Password plugin problem
Post by: gotspatel on March 12, 2021, 10:47:36 PM
Found the solution

My site path was set as \\MAILSRV.DOMAIN.COM\C$\inetpub\wwwroot\roundcube\Public_html

I changed it to %SystemDrive%\inetpub\wwwroot\roundcube\public_html\

Working fine now.