- 论坛徽章:
- 0
|
二搂的哥们写的倒是没错,但是我加进去了,在web登陆用户后,点击“选项”后,不显示任何东西,但如果再把它取出来,就能看见选项里的一些设置,并且我在config.php里加上了chpasswd的绝对路径
下边是4.X的tar包,里的文档:INSTALL文件
Installing Change Passwd Plugin
===============================
1) Start with untaring the file into the plugins directory.
Here is a example for the 3.1 version of the change_passwd
plugin.
$ cd plugins
$ tar -zxvf change_passwd-3.1-1.2.8.tar.gz
2) Change into the change_passwd directory, copy config.php.sample
to config.php and edit config.php, making adjustments as
you deem necessary.
$ cd change_passwd
$ cp config.php.sample config.php
$ vi config.php
3) Make sure the file permissions on the chpasswd file are
correct (unless you'll be using the 'pw' utility on
FreeBSD). Substitue the name of the user that your web
server runs under for "apache" in the command below:
$ chown root:apache chpasswd
$ chmod 4750 chpasswd
4) If you are running this under Solaris on a Sparc machine, you
probably need to recompile the chpasswd.c file:
$ gcc -lcrypt -O -o chpasswd chpasswd.c
5) Then go to your config directory and run conf.pl. Choose
option 8 and move the plugin from the "Available Plugins"
category to the "Installed Plugins" category. Save and exit.
$ cd ../../config/
$ ./conf.pl
6) Also, please verify that you have the "compatibility" plugin
installed.
config.php内容:
<?php
global $confirmPass, $oldPass, $seeOutput, $pathToChpasswd,
$pathToPw, $debug, $minimumPasswordLength;
// Set this to the minimum length of passwords you want
// to enforce. Set to zero to disable this check
//
$minimumPasswordLength = 8;
// Set this to 1 if you want the user to have to enter
// their new password twice. Set to zero otherwise,
// but why would you do that?
//
$confirmNewPass = 1;
// Set this to 1 to require the user to enter thier current
// password in order to change it (FreeBSD ('pw' utility)
// users typically set this to zero; others can (and should!)
// leave this as is.
//
$confirmOldPass = 1;
//$confirmOldPass = 0;
// Please include the full path (not relative) to the chpasswd program
// ONLY if you are NOT using the one included with this plugin!
//
$overridePathToChpasswd = '';
// Use this setting only if you want to use the pw program to change
// your password (available on e.g. FreeBSD). Include full path
// (not relative) to the pw program. This will override the chpasswd
// program, so leave it empty if you are using chpasswd.
//
$pathToPw = '';
// If you want see the output of the chpasswd program (usually
// only useful for debugging purposes, set this to 1
//
$seeOutput = 0;
// For debugging only, set this variable to 1. WARNING: this will
// echo any password information you enter in clear text! Please
// use this setting with care!
//
$debug = 0;
?> |
|