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

SquirrelMail1. Connect to your SquirrelMail server and note down its version.
SquirrelMail2. Download the Change Passwd 4.2c and Compatibility 2.0.x plugins.
SquirrelMail3. Extract the downloaded files and put them into the /usr/share/squirrelmail/plugins directory.
SquirrelMail Configuration4. From a Terminal window, type in /usr/share/squirrelmail/config/conf.pl and press Enter. This will launch the SquirrelMail Configuration utility.

NoteIf 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.

SquirrelMail Configuration5. Type in 8 and press Enter to list the Plugins submenu.
SquirrelMail Configuration6. 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.
Terminal
7. If your version of SquirrelMail is not 1.4.13 and higher or 1.5.1 and higher, you need to patch your SquirrelMail source. Go to /usr/share/squirrelmail/plugins/compatibility and apply the compatibility patch by typing in the command below.
patch -p0 < patches/compatibility_patch-1.4.8.diff
Replace 1.4.8 with your SquirrelMail version.
GEdit8. 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

SquirrelMail1. Login to SquirrelMail and go to the Options page. You should see the new Change Password section.
SquirrelMail2. Click the Change Password link to view the new Change Password page.

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.

  1. Set $seeOutput to 1 in config.php to enable you to see the actual error message.
  2. Set display_errors to On in /etc/php.ini then restart the httpd service.

Permission Problems

  1. Get the Group account used to run Apache by typing in
    grep -i ^group /etc/httpd/conf/httpd.conf
    
    Sample result
    Group apache
    
  2. 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
    
  3. 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


Share This