ispCP - Board - Support
New Version of E-mail, FTP, and SQL Password Changer - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Contributions Area (/forum-40.html)
+--- Forum: Enhancements (/forum-43.html)
+--- Thread: New Version of E-mail, FTP, and SQL Password Changer (/thread-9776.html)

Pages: 1 2


New Version of E-mail, FTP, and SQL Password Changer - Dolomike - 02-28-2010 05:57 PM

Hi all,

I have completed a new version of the password changer. Please give it a try and let me know if you find any errors or would like any additions. I've tried to follow the coding standards so hopefully this code is good enough to make it into the trunk at some point.

The password changer has the following features:
  • Allows users to change E-mail, FTP, and SQL passwords
  • Administrator can turn on/off password changer
  • Administrator can select which passwords can be changed
  • Uses captcha (same one already used in ispCP)
  • Performs all the same password checks that is done within ispCP
  • Timer retry for incorrect attempts (not fully working)
  • Uses default ispCP theme for same look and feel as the rest of the ispCP
  • Logs each failure and successful password change

To install, perform the following steps:
  • Change to the ispCP GUI directory ( cd /var/www/ispcp/gui)
  • Extract the files (tar -zxvf changepassword-0.1.tar.gz)
  • Add the following configuration settings into include/ispcp-lib.php

    PHP Code:
    // Enable change password functionality
    Config::set('CHANGEPASSWORD'true);

    // Enable individual password change
    Config::set('CHANGEPASSWORDEMAIL'true);
    Config::set('CHANGEPASSWORDFTP'true);
    Config::set('CHANGEPASSWORDSQL'true);

    // captcha imagewidth
    Config::set('CHANGEPASSWORD_CAPTCHA_WIDTH'280);
    // captcha imagehigh
    Config::set('CHANGEPASSWORD_CAPTCHA_HEIGHT'70);
    // captcha background color
    Config::set('CHANGEPASSWORD_CAPTCHA_BGCOLOR', array(229,243,252));
    // captcha text color
    Config::set('CHANGEPASSWORD_CAPTCHA_TEXTCOLOR', array(0,53,92)); 
  • For any accounts you don't want users to be able to change, simply set the corresponding configuration setting in include/ispcp-lib.php to false
  • Try it out! http://ispcp.domain.tld/changepassword.php

A few things still need to be done:
  • Fix the retry timer - not displayed at the right page and the "back" link is hardcoded to index.php in include/login-functions.php
  • Add web GUI code to allow the configuration settings to be changed within the ispCP web GUI (Under the Settings page)



RE: New Version of E-mail, FTP, and SQL Password Changer - MasterTH - 02-28-2010 06:44 PM

Looks great,

big thanks!!!


RE: New Version of E-mail, FTP, and SQL Password Changer - Knut - 02-28-2010 11:45 PM

Thanks !
I hope this come into the next Trunk.


RE: New Version of E-mail, FTP, and SQL Password Changer - TheCry - 03-01-2010 05:22 PM

(02-28-2010 11:45 PM)Knut Wrote:  Thanks !
I hope this come into the next Trunk.

We can think about this, but we need a ticket as enhancement or nice to have!


RE: New Version of E-mail, FTP, and SQL Password Changer - help40 - 03-07-2010 09:08 PM

sorry for stupid question , but what is the difference "old pass change" and "new one" ?


RE: New Version of E-mail, FTP, and SQL Password Changer - Knut - 03-07-2010 09:16 PM

(03-01-2010 05:22 PM)TheCry Wrote:  We can think about this, but we need a ticket as enhancement or nice to have!

Here we go: http://www.isp-control.net/ispcp/ticket/2263


RE: New Version of E-mail, FTP, and SQL Password Changer - Dolomike - 03-08-2010 01:41 PM

Thanks Knut for adding the ticket!

Help40,

The new one follows the ispCP programming structure, uses the ispCP template system, themes, translation system, captcha and retry timer while the old one didn't contain any of these features.

Although they perform the same function, simply put, it looks and operates more like a built in ispCP module rather than something just thrown together.

Dolomike


RE: New Version of E-mail, FTP, and SQL Password Changer - grisu - 06-17-2010 03:43 AM

hi there

Nice one... I like the feature! but gotta problem. I've just installed it.

After submitting the form it just reloads the form again (with new captcha). No error, no confirmation, just nothing... This happens every time and it's not depending if captcha-answer is right or wrong.

What works is: If the language of the panel is in ENGLISH the form is in english.. and if the language is set to german, the form either is german..

I don't find an error message, so maybe you have an idea where to check / what to try?

thanks in advance!


RE: New Version of E-mail, FTP, and SQL Password Changer - N!Ce - 07-06-2010 02:02 AM

I installed this on ispCP 1.0.5 and have a little problem with it, hope anyone can help me out.

Changing password seems to work, I get the message that it was successfully changed and looking at the database it changed indeed. However, if I try to log into the webmail account of the changed password, it still accepts only the old password.

But, if I try to change the password again with PasswordChanger it asks for the changed password. It's like SquirrelMail takes its password/user details from another DB than the one this tool writes in.

Changing password from ispCP frontend works btw.

Does anyone have an idea? I have the feeling I am just not seeing the forest because of too many trees. o_O

Technical info
ispCP Version: 1.0.5
SquirrelMail: 1.4.20 (the one included in ispCP 1.0.5)
Distro: Debian Lenny
Error messages: none

PS: Ich spreche auch Deutsch =x


RE: New Version of E-mail, FTP, and SQL Password Changer - joximu - 07-07-2010 05:31 PM

Hi N!Ce

the password changer from this thread is not part of ispcp.

But we may try to help you.

Obviously the password is changed at least in the ispcp database.

It seems not to be changed in the userdb of imap (where squirrel authenticates). So also the pop and imap passwords should be unchanged -> please verify.

Now: if also the "smtp auth" passwords are unchanged (please check) then we know at least what's working and what is not.

Then we can look where the error is....

(btw: you don't have errors in the ispcp logs???)

/J