If you are using Linux system accounts as your mail accounts, you can install the change_passwd plugin to enable SquirrelMail to provide a password change utility.
Install the SquirrelMail Change Password Plugin

4. From a Terminal window, type in /usr/share/squirrelmail/config/conf.pl and press Enter. This will launch the SquirrelMail Configuration utility.
If your Terminal window has a white background, make sure that the colors are off by looking for the command Turn color on. If the command is Turn color off, type in C and press Enter to turn the colors off. This will ensure that you will be able to read all of the text.

6. Install the change_passwd plugin by typing in the number corresponding to it and press Enter. When you are done, type in q and press Enter to quit then type in y and press Enter to save your changes.

patch -p0 < patches/compatibility_patch-1.4.8.diffReplace 1.4.8 with your SquirrelMail version.

8. In the /usr/share/squirrelmail/plugins/change_passwd directory, copy the file config.sample.php and save it as config.php. Edit config.php and review the default settings.Here are some useful settings in config.php
- $minimumPasswordLength - Minimum length of the password.
- $seeOutput - Shows the output of the change password program. Useful for tracing problems.
- $changePasswdInLogin - Change password from the login form.
Test the SquirrelMail Change Password

1. Login to SquirrelMail and go to the Options page. You should see the new Change Password section.Troubleshooting the SquirrelMail Change Password
General Problems
If the Change Password plugin is not working or you are encountering a blank page, try the two items below to enable you to see the error message.
- Set $seeOutput to 1 in config.php to enable you to see the actual error message.
- Set display_errors to On in /etc/php.ini then restart the httpd service.
Permission Problems
- Get the Group account used to run Apache by typing in
grep -i ^group /etc/httpd/conf/httpd.conf
Sample resultGroup apache
- Verify that the ownership and permissions of the chpasswd binary (executable) file are correct. The file should be executable (and readable) by your web server group, and owned by root (with suid bit set). Assuming you got the value apache, its listing should appear similar to the one below.
-rwsr-x--- 1 root apache 9873 Oct 21 2002 chpasswd
- If it is different, type the commands below to correct it. Remember to change apache with whatever value you got from step 1.
chown root:apache chpasswd chmod 4750 chpasswd
chpasswd not working
The binary was built for the x86 architecture. You need to rebuild the binary if you are using a different architecture. Type in the command below to rebuild it then apply the steps above in setting the proper permission.
gcc -Wall -lcrypt -o chpasswd chpasswd.c
***
Posted on 12/13/2007 and last updated on 10/12/2008
Filed under SquirrelMail
ShareThis





May 6th, 2008 at 10:51 am
Sir, I have installed the change password plugin. I can already see the change password section but it’s not working. I can’t change my password. the message says:
“An error has occurred while attempting to change your password. Please contact your system administrator.”
May 6th, 2008 at 10:59 am
Are you using system accounts or virtual accounts? The password change works only for system accounts.
May 7th, 2008 at 3:16 am
I don’t understand well what and how virtual accounts work but I know I am using system accounts because I add my user using the command:
#useradd user
and then
#passwd user
to change the password..
Thanks!
May 8th, 2008 at 11:07 am
Ok, you are using system accounts. Try enabling the $seeOutput setting in /usr/share/squirrelmail/plugins/change_passwd/config.php to get more clue about your problem.
May 9th, 2008 at 2:11 am
Sorry to bother you sir but this is the output:
An error has occurred while attempting to change your password. Please contact your system administrator.
Command output:
sh: ../plugins/change_passwd/chpasswd: Permission denied
Return code: 126
May 9th, 2008 at 3:20 am
I tried this method. It solved my problem.
chown root:apache chpasswd
chmod 4750 chpasswd
My question is, Does this method create a security hole?
May 9th, 2008 at 1:11 pm
That’s it, that was the solution. That’s the way it should be. Below is from /usr/share/squirrelmail/plugins/change_passwd/README
2) Please verify that the ownership and permissions of the chpasswd
binary (executable) file are correct. The file should be executable
(and readable) by your web server user, and owned by root (with
suid bit set) (see step number 3 in the INSTALL file). Its listing
should appear similar to this:
-rwsr-x— 1 root apache 9873 Oct 21 2002 chpasswd*
Read the support section above to determine if the group ownership
of this file should be “apache” or “nobody”, etc. It should exactly
match the group which your web server is running as.
May 10th, 2008 at 6:03 am
Thanks sir. Is it also possible to include captcha feature? I’ve tried to install captcha using the procedure that you illustrated in the installation of the change password plugin but it didn’t work.. Can you teach us how?
May 12th, 2008 at 6:27 am
Thank you very much… Can you teach us how to use captcha? I used the process in installing the change password plugin but it didn’t work for me.
Thanks again.
May 13th, 2008 at 3:44 pm
Done. See SquirrelMail CAPTCHA. Unfortunately, the change password plugin will not work after installing this since you need the newer compatibility plugin for this. I’ll see what I can do to resolve this.
May 14th, 2008 at 2:44 pm
Done. The change password plugin has been updated to be compatible with Compatibility 2.x
May 16th, 2008 at 5:14 am
Everything works fine now… Thanks to our Consultant….
May 19th, 2008 at 2:39 am
I install change password plugin and Squirrelmail dont work.
It give me a white webpage
Could help me???
May 19th, 2008 at 3:15 am
What version of SquirrelMail are you using?
May 20th, 2008 at 4:48 pm
Hi there –
I completed the installation of the change_passwd plugin, but when I get to the login page, instead of seeing the appropriate button, the following error message appears in its place:
Notice: Undefined variable: changePasswdInLogin in /usr/share/squirrelmail/plugins/change_passwd/functions.php on line 63
The version of php that is on the server in question is 5.2.4.
May 21st, 2008 at 2:29 am
Hi,
You did not do step 8 which is copy config.php.sample and save it as config.php. The configuration is intentionally named config.php.sample to simplify upgrades.
May 21st, 2008 at 3:43 pm
Hi there –
I ran through the steps again, and made sure to copy the correct file mentioned in step 8 of the procedure. The error message that is appearing now is the following:
Parse error: syntax error, unexpected T_VARIABLE in /usr/share/squirrelmail/plugins/change_passwd/config.php on line 52
May 21st, 2008 at 9:42 pm
Please post your config.php. And what version of SquirrelMail are you using so I can try it out.
May 21st, 2008 at 10:27 pm
Hi there –
Per your request here is the information you requested:
SquirrelMail version: SquirrelMail version 1.4.10a-1.fc7
Listed below is the text of the config.php file on the server in question:
##############################################
May 21st, 2008 at 10:27 pm
May 21st, 2008 at 10:28 pm
I am having problems posting the file in question, is there another way of my getting it to you?
May 21st, 2008 at 10:44 pm
Sure, consultant@linux-mail.info
May 25th, 2008 at 10:27 am
Hello
I have a problem with cgange_passwd
please, help me anybody
i have a squirrelmail Version: 1.4.15,
change_passwd Version 4.0.
if i install compatibility Version 2.0.11, i have a “Could not determine your username. Please contact your system administrator.”.
if i install compatibility Version 1.3, i have “missing new password”.
please help me =\
May 25th, 2008 at 10:31 am
with compability v 1.3 and $seeoutput=1 :
“Missing new password
Command output:
../plugins/change_passwd/chpasswd: 1: Syntax error: “(” unexpected
Return code: 2″
May 25th, 2008 at 1:24 pm
Hi Igor,
I suggest you use the follow the guide first. The two components above have already been tested to work properly together.
July 14th, 2008 at 12:16 am
I have a problem with cpanel_pw_changer.
I have a squirrelmail Version: 1.4.13, and capability plugin. I see change password in options, but wen i click on this link, the message says:
Fatal error: Call to undefined function: php_self() in /home/www/wap.crnca.100webspace.net/webmail/plugins/compatibility/includes/1.5.0/global.php on line 25
please help
July 14th, 2008 at 12:17 am
I have a problem with cpanel_pw_changer.
I have a squirrelmail Version: 1.4.13, and compatibility plugin. I see change password in options, but wen i click on this link, the message says:
Fatal error: Call to undefined function: php_self() in /home/www/wap.crnca.100webspace.net/webmail/plugins/compatibility/includes/1.5.0/global.php on line 25
please help
July 18th, 2008 at 6:14 am
hi, I have installed squirrelmail version 1.4.15 unable to installed the change passwd plugins
July 23rd, 2008 at 5:14 am
hi,
i am on FC9 with SquirrelMail version 1.4.13-1 but when i install the change_passwd plugin its giving me blank page its not at all showing the other option also
July 25th, 2008 at 3:30 am
i have install changed passwd and complability pluigin. But when I click in change_Paswwd option then the screen is blank.
Plz help me….
July 25th, 2008 at 9:01 am
hi,
i’m trying change passwd plugin but with debug on iused to get
cd /usr/share/squirrelmail/plugins
../plugins/change_passwd/chpasswd ‘username’ ‘oldpasswd’ ‘newpasswd’ 2>&1
when i run it it gives me
Floating point exception
my chpasswd permissions
-rwsr-x— 1 root apache 10744 May 23 06:50 chpasswd
please help
July 25th, 2008 at 9:08 am
After reinstalling & changing the permissions it shows the this error & permissions of chpasswd are
-rwsr-x— 1 root apache 10744 May 23 06:50 chpasswd
An error has occurred while attempting to change your password. Please contact your system administrator.
Command output:
sh: ../plugins/change_passwd/chpasswd: Permission denied
Return code: 126
& if i use that cmd mode of changing passwd then again Floating point exception comes
plz help
August 9th, 2008 at 2:29 pm
A troubleshooting section has been added for everyone having problems using the SquirrelMail change_password plugin.
August 20th, 2008 at 11:20 am
how to increase the attachment size in squirrelmail in suse
August 20th, 2008 at 3:30 pm
Hi Sam,
Check out this site
http://www.squirrelmail.org/wiki/AttachmentSize
August 21st, 2008 at 3:14 am
ok thank u i will it out tanks a lot for ur replay
August 21st, 2008 at 10:40 am
if i have a public ip address i want to translate it to private ip address to my private n/w whts the process (i have configured squid also). please give me the replay sir
August 26th, 2008 at 9:35 am
if i have a public ip address i want to translate it to private ip address to my private n/w whts the process (i have configured squid also)
August 26th, 2008 at 1:32 pm
This depends on your network configuration. If your public ip address is assigned to a router, you can configure port forwarding to forward traffic to your private network.
September 27th, 2008 at 5:15 am
this shows every times i change the password ….plz help me
cd /usr/share/squirrelmail/plugins
../plugins/change_passwd/../plugins/change_passwd/chpasswd ‘admin’ ‘33′ ‘44′ 2>&1
September 27th, 2008 at 5:20 am
why this shows every time…..i try to change the password for any user..
i am in trouble…..plz help
i also want to know how to add to see the quota status for user mail box. in squirrelmail.
To test the chpasswd utility from the command line, do this:
cd /usr/share/squirrelmail/plugins
../plugins/change_passwd/chpasswd ‘admin’ ‘33′ ‘44′ 2>&1
September 29th, 2008 at 1:42 pm
Hi,
I am trying to translate the change_passwd plugin without success. Here’s what I did:
1. change_passwd.pot copied to plugins/change_passwd/locale/bg_BG/LC_MESSAGES/change_passwd.po
2. change_passwd.po strings translation
3. msgfmt -o change_passwd.mo change_passwd.po
and I still get the default locale in my squirrelmail Change Password section, although any other plugin is translated successfully (I translated all the plugins myself from scratch after installing them).
I am using squirrelmail 1.4.15 and change_passwd 4.2
Thank you very much in advance.
September 29th, 2008 at 1:50 pm
BTW, even in 4.2c , in the ‘version’ file it sill says:
$ cat version
Change Passwd
4.0
September 30th, 2008 at 2:20 am
hi! tried to use this how-to but i cannot see the change password at option. i am currently running a 1.4.15 version in https..
does it need another configuration since it is in https?
hoping for your response…
September 30th, 2008 at 2:46 am
got it fixed…
my working directory is in /usr/local that’s why its not working if i configure it in /usr/share/****
by the way… nice how to. it really works!
September 30th, 2008 at 2:54 am
for anybody out there using 1.4.15
there’s no patch for this version. instead, i use
patch -p0 < patches/compatibility_patch-1.4.15.diff
October 12th, 2008 at 10:29 am
installed the above change password, but after clicking on the change password - it is opening a blank web page. not giving the password options to change. chpasswd from the command prompt works fine
October 12th, 2008 at 10:30 am
getting blank screen while clicking on the change password options. pl. help me.
squirrl ver 1.4.5
October 12th, 2008 at 10:50 am
Hi vis,
Please try the items in the General Problems section to enable you to see the error message.
October 12th, 2008 at 11:47 am
after enabling display on php.ini,
i am getting the below error while clicking the change passwd, pl help
Fatal error: Call to undefined function: php_self() in /var/www/html/squirrelmail-1.4.5/plugins/compatibility/includes/1.5.0/global.php on line 25
October 13th, 2008 at 11:34 am
hi
i’ve installed plugin as instructed by you but still its giving errors
my permisssions are
grep -i ^group /etc/httpd/conf/httpd.conf
Group apache
[root@local change_passwd]# ll
total 180
-rwsr-x— 1 root apache 10744 Aug 9 13:16 chpasswd
my password changing is wrkng fine but
now a new error is coming
the error is
Your password was changed successfully.
Command output:
The password was modified successfully
Return code: 0
please help
October 13th, 2008 at 10:00 pm
Hi Anshul,
Your setup is working fine. Please set $seeOutput = 0 It should only be used when change password is not working.