安裝changepassword線上修改密碼


安裝配置changepassword

1,下載解壓:

wget http://prdownloads.sourceforge.net/changepassword/changepassword-0.9.tar.gz

tar -zxvf changepassword-0.9.tar.gz

2.編譯changepassword前需要安裝一個依賴包

cd changepassword-0.9/smbencrypt/

tar -zxvf libdes-4.04b.tar.gz

cd des/

make

cp libdes.a ../

cd ../..


3.編譯安裝changepassword,可準備網站的logo.jpg先上傳到/var/www/cgi-bin

vi lang.h

#if defined(TChinese)
#include "languages/TChinese.h"
#define charset "utf8"
#endif

然後

./configure -enable-cgidir=/var/www/cgi-bin -enable-language=TChinese -enable-smbpasswd=/etc/samba/smbpasswd  -disable-squidpasswd  -enable-logo=samba/logo.jpg

4.開始編譯

make && make install

5.修改apache支持模組,去掉下列的#

vi /etc/httpd/conf/httpd.conf

LoadModule cgid_module modules/mod_cgid.so
AddHandler cgi-script .cgi

--------

Options Indexes FollowSymLinks ExecCGI

6.重新啟動服務

service httpd restart

7.測試網站

http://163.32.x.x/cgi-bin/changepassword.cgi