[rt-users] Automatic password generation for autocreated users

Beachey, Kendric Kendric.Beachey at garmin.com
Fri Mar 1 11:13:03 EST 2002


I was digging in my bushel basket of old RT mail and I found a note I had
tucked away for later, but never got to revisit until now.  It described how
to make autocreated users get a default password.

I went ahead and tried this myself, and I found that RT has evolved a bit
since the original message, so the procedure to do this is slightly
different now.  Here's how I got it to work:

In .../rt/lib/RT/Interface/Email.pm, find the section where the subroutine
GetCurrentUser is defined.  Near the bottom is the section where new users
are autocreated.  Currently it's about line 408, but that could change as RT
evolves.  You'll find a call like this:

$NewUser->Create(Name => ($Username || $Address),
                          EmailAddress => $Address,
                          RealName => "$Name",
                          Password => undef,
                          Privileged => 0,
                          Comments => 'Autocreated on ticket submission'
                          );

Change that "undef" on the Password line to something else of your
choosing--"welcome" or "password" or "kh43jh5445" or whatever.

Or you can do what I did, which was to set it to "$Address", so that the
user's password will be the same as their email address.

Either way, if you grant "ModifySelf" permission to the "Everybody" group,
they can change their password from the SelfService area of the web
interface.

--
Kendric Beachey
 




More information about the rt-users mailing list