‘ChangePassword’ is a web CGI utility that allows users to change their password through a web browser.
As of this writing, the latest available version of ‘ChangePassword’ is changepassword-0.9. And this installation is tested on CentOS 6.5 minimal.
Please note that I am using apache web server with mod_cgi and mod_ssl enabled.
‘gcc’ and ‘make’ is needed to compile and install ‘ChangePassword’.
Install this with the following command:
[[email protected] ~]# yum -y install gcc make
Download the ‘ChangePassword’ tarball and extract it as follows
[[email protected] ~]# cd /opt [[email protected] opt]# wget http://prdownloads.sourceforge.net/changepassword/changepassword-0.9.tar.gz [[email protected] ~]# tar -xf changepassword-0.9.tar.gz
Now change into the ‘ChangePassword’ directory and then to ‘smbencrypt’. There is a compilation error with ‘libdes.a’. We will recompile it here.
[[email protected] ~]# cd changepassword-0.9/smbencrypt [[email protected] smbencrypt]# tar -xzvf libdes-4.04b.tar.gz [[email protected] smbencrypt]# cd des [[email protected] des]# make [[email protected] des]# cp libdes.a .. (Reply with y when it asks to overrite) [[email protected] des]# cd ../.. [[email protected] changepassword-0.9]#
Please note that we had downloaded the ‘ChangePassword’ tarball and extracted it in /opt. So we have to update the same in the ‘conf.h’ file in the presently working directory. Find the line
and change it to
using vi editor or any other editor of your choice.
Configure ChangePassword by pointing it to the default CentOS apache cgi directory and disabling samba and squid password change. If samba and squid password change is needed in your environment, the you have to update ‘conf.h’ file like this
In this example, i have disabled the samba and squid password change feature by passing the ‘disable’ option to the ‘configure’ script.
[[email protected] changepassword-0.9]#./configure -enable-cgidir=/var/www/cgi-bin/ -disable-smbpasswd -disable-squidpasswd [[email protected] changepassword-0.9]# make [[email protected] changepassword-0.9]# make install
Check for errors.
If everything goes fine you should be able to change user passwords with this url
Please replace ‘your-server-ip-address’ with required ip address of your server.