SV: [rt-users] Autogenerating password

Ruslan U. Zakirov Ruslan.Zakirov at acronis.com
Thu Oct 21 09:13:53 EDT 2004


Hilde Therese Lauvset wrote:
> Hi again,
> 
> I visited http://wiki.bestpractical.com/index.cgi?AutogeneratedPassword
> and copied the code into our AutoReply template. After I sent a request
> to RT I just got the "welcome" text and no password. 
It was just see also. no password? or password is empty? Please, don't 
describe what you get, but paste it or attach(you can always change 
private info with 'xxxx').

You didn't answer my questions regarding code that you sent in prev email.

> 
> The rt.log didn't show any errors:
>  
> [Thu Oct 21 12:23:06 2004] [debug]: Converting 'utf-8' to 'iso-8859-1'
> for text/plain - [rt.orakel.uit.no #3634] test 3 
>  (/opt/rt3/lib/RT/I18N.pm:200)
> [Thu Oct 21 12:23:06 2004] [info]:
> <rt-3.0.10-3634-26757.13.5242261422979 at uit.no>
>  No recipients found. Not sending.
>  (/opt/rt3/lib/RT/Action/SendEmail.pm:257)
> [Thu Oct 21 12:23:06 2004] [info]:
> <rt-3.0.10-3634-26757.15.7626586344364 at uit.no> #3634/26757 - Scrip 16
> Autosvar ny sak (/opt/rt3/lib/RT/Action/SendEmail.pm:92)
> [Thu Oct 21 12:23:06 2004] [debug]: Converting 'utf-8' to 'iso-8859-1'
> for text/plain - [rt.orakel.uit.no #3634] AutoReply: test 3 
>  (/opt/rt3/lib/RT/I18N.pm:200)
> [Thu Oct 21 12:23:07 2004] [info]:
> <rt-3.0.10-3634-26757.15.7626586344364 at uit.no> sent To: hildetl at msn.com
> Cc:  Bcc:  (/opt/rt3/lib/RT/Action/SendEmail.pm:302)
> [Thu Oct 21 12:23:07 2004] [info]: Ticket 3634 created in queue
> '*Ufordelt' by hildetl at msn.com (/opt/rt3/lib/RT/Ticket_Overlay.pm:640)
> 
> 
> 
> 
> 
> -----Opprinnelig melding-----
> Fra: Ruslan U. Zakirov [mailto:Ruslan.Zakirov at acronis.com] 
> Sendt: 21. oktober 2004 12:06
> Til: Hilde Therese Lauvset
> Kopi: rt-users at lists.bestpractical.com
> Emne: Re: [rt-users] Autogenerating password
> 
> Hilde Therese Lauvset wrote:
> 
>>Hi,
>>
>> 
>>
>>We run RT 3.0.10 and have found a script on this e-mail list for auto 
>>generation of password for users who send a message to RT for the
> 
> first 
> 
>>time. There seems to be a problem though, because we don't receive a 
>>reply message with the new generated password.
> 
> Where is logs? Errors? If it's in ML then it works for somebody.
> Do you have template 'RT_PasswordChange'?
> 
> See also: http://wiki.bestpractical.com/index.cgi?AutogeneratedPassword
> 
> 
> 
>> 
>>
>>This is the scrip we run:
>>
>> 
>>
>>----------start code-------------
>>
>>{
>>
>>  my $tmplName = 'RT_PasswordChange';  ## hardwired template name
>>
>>  my ($user) = $self->TransactionObj->CreatorObj;
>>
>>  if (($user->id != $RT::Nobody->id) && (!$user->Privileged) &&
>>
>>      $user->__Value('Password') eq '*NO-PASSWORD*' && $user->Name =~
> 
> /\@/) {
> 
>>    my ($stat, $pass) =
> 
> $self->TransactionObj->CreatorObj->SetRandomPassword();
> 
>>    if ($stat) {
>>
>>      my $template = RT::Template->new( $user->CurrentUser );
>>
>>      $template->LoadGlobalTemplate($tmplName);
>>
>>      unless ($template->Id) {
>>
>>        $RT::Logger->crit( "$user tried to send ". $user->Name .
>>
>>        " a password reminder, but couldn't find tmpl: $tmplName");
>>
>>        die "failed to load $tmplName template";
>>
>>      }
>>
>>      my $notification = RT::Action::SendEmail->new(
>>
>>            TemplateObj => $template,
>>
>>            TransactionObj => $self->TransactionObj,
>>
>>            TicketObj => $self->TicketObj,
>>
>>            ScripObj => $self->ScripObj,
>>
>>            Argument    => $pass);
>>
>>      @{ $notification->{'To'} } = ( $user->EmailAddress );
>>
>>      my ($ret) = $notification->Prepare();
>>
>>      $ret = $notification->Commit() if $ret;
>>
>>      $RT::Logger->crit("Set Password scrip: $user: SendEmail failed
> 
> sending ".
> 
>>                        $user->Name . " the password setting
> 
> reminder.")
> 
>>        unless ($ret);
>>
>>    } else {
>>
>>      $RT::Logger->crit("Set Password Scrip: Failed to set password
> 
> for: \"".
> 
>>        $user->Name."\", pass=".$pass);
>>
>>     }
>>
>>    }
>>
>>    1;
>>
>>}
>>
>>----------------end scrip code-----------------
>>
>> 
>>
>> 
>>
>> 
>>
>>I hope someone can tell me what might be the problem or that someone
> 
> can 
> 
>>send me a script that works with RT 3.0.10
>>
>> 
>>
>>--
>>
>>Hilde
>>
>> 
>>
>>
>>
> 
> ------------------------------------------------------------------------
> 
>>_______________________________________________
>>http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>
>>Be sure to check out the RT wiki at http://wiki.bestpractical.com
> 
> 
> 




More information about the rt-users mailing list