Php Error Password Plugin Unable To Execute Sudo
» Pending Issues » Password plugin error (chpasswd) « previous next » Print Pages: [1] Author Topic: Password plugin error (chpasswd) (Read 4948 times) balbung Newbie Posts: 5 Password plugin error (chpasswd) « on: April 03, 2012, 12:35:17 PM » Hi friends,I have a little problem with the password plugin. I see many people it is the same, i receive the error message "password could not be saved". i´m trying to do it with chpassword and in config.inc.php i have:Code: [Select]$rcmail_config['password_driver'] = 'chpasswd';And in chpasswd.php:Code: [Select]function password_save($currpass, $newpass)
{
$cmd = rcmail::get_instance()->config->get('password_chpasswd_cmd');
$username = $_SESSION['username'];
$handle = popen($cmd, "w");
fwrite($handle, "$username:$newpass\n");
if (pclose($handle) == 0) {
return PASSWORD_SUCCESS;
}
else {
raise_error(array(
'code' => 600,
'type' => 'php',
'file' => __FILE__, 'line' => __LINE__,
'message' => "Password plugin: Unable to execute $cmd"
), true, false);
}
return PASSWORD_ERROR;I have checked the open tickets but i can´t find anything.Anybody can help me? Logged SKaero Administrator Hero Member Posts: 4,839 Re: Password plugin error (chpasswd) « Reply #1 on: April 04, 2012, 02:30:17 AM » Whats in your error log? Logged SKaero.com balbung Newbie Posts: 5 Re: Password plugin error (chpasswd) « Reply #2 on: April 04, 2012, 04:22:12 AM » Thanks for your reply!!!I forgot the log Code: [Select][04-Apr-2012 10:18:31 +0200]: PHP Error: Password plugin: Unable to execute sudo /usr/sbin/chpasswd 2> /dev/null in /var/www/html/webmail/plugins/password/drivers/chpasswd.php on line 30 (POST /webmail/?_task=settings&_action=plugin.password-save?_task=&_action=)maybe I should mention that i´m working with Centos 5.7Thanks in advance Logged SKaero Administrator Hero Member Posts: 4,839 Re: Password plugin error (chpasswd) « Reply #3 on: April 04, 2012, 05:54:56 AM » It looks like the user who runs the script (most likely apache) doesn't have the permissions to run the sudo command. Logged SK
for changing password 9 posts / 0 new Log in or register to post comments Last post #1 Wed, 12/30/2009 - 07:51 RedKnot Roundcube plugin for changing password See http://trac.roundcube.net/ticket/1486398 Log in or register to post comments #2 Sat, 03/27/2010 - 11:22 jonkristian Awesome, I've been looking for this. However it doesn't work for me. I have roundcube installed in one location, and have my users login with username.domain and password. Log in or register to post comments #3 Sat, 03/27/2010 - 14:05 RedKnot Please explain what is going wrong, do you have any error messages? Log in or register to post comments #4 Sat, 03/27/2010 - 15:43 jonkristian http://www.roundcubeforum.net/index.php?topic=9563.0 From roundcube i get: Could not save new password In the error log of roundcube i see this: [27-Mar-2010 18:01:07 +0100]: PHP Error: Password plugin: Unable to execute /home/domain.com/public_html/plugins/password/drivers/chgvirtualminpasswd in /home/domain.com/public_html/plugins/password/drivers/virtualmin.php on line 0 (POST /?_task=settings&_action=plugin.password-save?_task=&_action=) Log in or register to post comments #5 Mon, 03/29/2010 - 13:27 RedKnot Make sure the file permissions are correct -r-sr-x--- Log in or register to post comments #6 Mon, 03/29/2010 - 18:00 https://www.virtualmin.com/node/12837 jonkristian Yes, been going through all the steps at least 10 times, so it's not that either:/ Although the file is red when it's chmod'ed that way, i did also test with full permissions. I am interested to know what it extracts from $_SESSION['username'] If it's the login name that people enter, that would be username.domain i don't understand: $domain = substr(strrchr($username, "@"), 1); That line looks like it's searching for @ and grabs whatever is behind it, but if the username variable only has username.domain it won't work. Log in or register to post comments #7 Tue, 04/27/2010 - 18:48 jonkristian So any ideas? I'd like to know what kind of setup you are using, do you use username.domain or username@domain in virtualmin? Log in or register to post comments #8 Sun, 07/17/2011 - 00:29 alcsilian Hello guys. So I installed roundcube-0.4 (that's the version that the theme i bought require). Activated all stuff... But I only have this problem, the password changing.... I took the last password plugin, but it refuse to work. I have this error: PHP Error: Password plugin: Unable to execute /usr/share/roundcubemail-0.4/plugins/password/drivers/chgvirtualminpasswd in /usr/share/roundcubemail-0.4/plugins/password/drivers/virtualmin.php on line 67 (POST /webmail/?_task=settings&_action=plugin.password-save?_task=&_action=) Notice the chgvirtualminpasswd works if you invoke it in terminal: ./chgvir
Install Roundcube plugin - Change Password 34 posts / 0 new Log in or register to post comments Last post #1 Fri, https://www.virtualmin.com/node/23427 09/21/2012 - 04:01 keith Problem Install Roundcube plugin - Change Password All, I am trying to install change password plugin to roundcube but it does not work. The error log show DB Error: MDB2 Error: not found Query: _doQuery: [Error message: Could not execute statement] [Last executed query: SELECT update_passwd('........', php error '.........')] [Native code: 1305] [Native message: FUNCTION abc_roundcube.update_passwd does not exist] in /home/abc/public_html/webmail/program/include/rcube_mdb2.php on line 727 (POST /webmail/?_task=settings&_action=plugin.password-save?_task=&_action=) Anyone can help me to solve. thanks Keith Log in or register to post comments #2 Fri, 09/21/2012 - 15:58 andreychek Howdy, Note that we didn't actually write that particular plugin. However, I php error password sat down recently, and tinkered with it a bit to get it up and running. It actually works quite well! I wrote up instructions on how to get it working, those are attached to this post. Log in or register to post comments #3 Fri, 09/21/2012 - 21:33 (Reply to #2) keith Thanks for reply but i cannot access the link and show access denied! Thank Keith Log in or register to post comments #4 Fri, 09/21/2012 - 22:48 (Reply to #3) andreychek Durn! Okay, I attached them to the post above :-) Let us know how those work for you! Log in or register to post comments #5 Sat, 09/22/2012 - 12:18 (Reply to #4) keith Thank you so much and write the step. I tried but still no lucky. It show below error on log. PHP Error: Password plugin: Unable to execute /home/abc/public_html/webmail/plugins/password/helpers/chgvirtualminpasswd in /home/abc/public_html/webmail/plugins/password/drivers/virtualmin.php on line 73