Forgotten password reminder options?

We’re using the default RT3 integrated authentication mechanism. Some time
ago we implemented the custom ‘On Create User Defined with template
RT_PasswordChange’ scrip, but many people didn’t follow the prompts to
change their password away from the random one that was issued. Now we’re
starting to get reqests for password resets on a regular basis…

Has anyone developed a ‘tell me my password’ button/feature?


Kris Boutilier
Information Systems Coordinator
Sunshine Coast Regional District

If you’re using MySQL, there’s probably no way to remind password since it’s
MD5 encrypted. But here’s how you can reset it and send to the user:



my $customMessage;

if ($email) {
my $UserObj = RT::User->new($RT::SystemUser);


if (defined($UserObj->Id)) {
my ($val, $str) = ResetPassword($UserObj, $email);
$customMessage = $str;
else {
$customMessage = “No account matches that email address”;
else {
$customMessage = “Please enter an email address”;

sub ResetPassword {

my $self = shift;
my $email = shift;

unless ( $self->CurrentUserCanModify('Password') ) {
    return ( 0, $self->loc("Permission Denied") );
my ( $status, $pass ) = $self->SetRandomPassword();

unless ($status) {
    return ( 0, "$pass" );

my $template = RT::Template->new( $self->CurrentUser );

$template->LoadGlobalTemplate('Password Change');

$T::RealName = $self->RealName;
$T::Username = $self->Name;
$T::Password = $pass;

my $parsed = $template->_ParseContent();

my $entity = MIME::Entity->build(
                                  From => "dti-support\",
                                  To => $email,
                                  Subject => loc("Trouble Ticket New

‘X-RT-Loop-Prevention’ => $RT::rtname,
Type => “text/plain”,
Charset => “UTF-8”,
Data => [$parsed]
open (MAIL, “|$RT::SendmailPath $RT::SendmailArguments”) || return(0);
print MAIL $entity->as_string;

return ( 1, 'New password notification sent');



$email => undef