[rt-users] Questions on usernames and passwords

Binand Raj S. binand at gmx.net
Sat Jan 4 08:01:43 EST 2003


Hi,

Are RT usernames case sensitive?

I am creating a CanonicalizeAddress routine for my employer's use. It
would do

$email =~ s/\@.*ourdomain\.com//i;
return $email;

(Since the part before '@' in my company is unique, this is ok I expect.)

People tend to write their email address with different cases - I write
mine as BinandS at ourdomain.com, for example. I am already a user with
id 'binands' in RT (with various rights). So will that create a new
user? Should I make it do

$email =~ tr/A-Z/a-z/;

before returning?

Another question: I want to assign a password and mail it back if the
ticket is indeed from someone in ourdomain.com - I am fiddling around
with Email.pm. What I need is to assign a default password (generated
via mkpasswd) and possibly ModifySelf too.

I plan to add:
(All this in the else branch of the if inside GetCurrentUser)

my $pwd = undef;
if ($Address !~ /\@/) {
   $pwd = `/usr/bin/mkpasswd -s 0`;
}

And then call $NewUser->Create (Passwd => $pwd);

Now I need to mail this password to the user. :-( But by this time,
I have lost the email address. :( I can of course append ourdomain.com
(hardcode this in), but is there a better way?

Also, I need to assign the right - how do I do that? Or do I give EveryOne
ModifySelf right?

RT is on RH 7.3 + updates, Apache 1.3.27, fastcgi, RHDB (ie, Postgres).

Binand




More information about the rt-users mailing list