Auto creating a default password for unpriviledged user

OK I’ve found out why it didn’t work…

It was because I wanted a default password for a newly created user that caused RT to stop creating a new ticket via email. After I changed back the settings from “Password => xyz111,” to “Password => undef,” ticket creation via email worked again.

So how do I go about creating an auto default password for new a unprivileged user if the editing below does not work? I probably did something wrong… Thanks for any help you guys can give.

/opt/rt3/lib/RT/Interface/Email.pm

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

Jonathan Chen-----Original Message-----
From: Jonathan Chen
Sent: Saturday, February 07, 2004 8:47 PM
To: ‘rt-users@lists.fsck.com’
Subject: Another EX_TEMPFAIL Problem

Hello all,

I can’t figure out what happened. I was only performing upgrades using CPAN for all the RT3 dependencies… Most of the upgrades went fine with a couple of the dependency I had to manually install. So after the upgrade, I wanted to test if my rt3 is working still after all the upgrades and something went terribly wrong and I just do not know what happened.

Also not sure what “error: no value sent for required parameter ‘message’” mean when I did send file with content in it.

I am using
RH9,
MySQL 4.16,
RT3.08
Apache 2 with FastCGI 2.4.0 (did not do upgrade on fastcgi)
HTML Mason was upgraded today

I’ve tried to do the command below….

cat dead.letter |/opt/rt3/bin/rt-mailgate --queue MSC --action correspond --url http://172.16.200.200/rt/ --debug

OK I’ve found out why it didn’t work…

It was because I wanted a default password for a newly created user that caused RT to stop creating a new ticket via email. After I changed back the settings from “Password => xyz111,” to “Password => undef,” ticket creation via email worked again.

undef is a special value in perl.

Had you had:

Password => 'xyzzy', 

it would have been fine.

Request Tracker... So much more than a help desk — Best Practical Solutions – Trouble Ticketing. Free.

Thanks for the quick reply Jesse.

I didn’t know you had to enclose the default password with " ’ "

Thanks again!
Jonathan Chen-----Original Message-----
From: Jesse Vincent [mailto:jesse@bestpractical.com]
Sent: Sunday, February 08, 2004 2:23 PM
To: Jonathan Chen
Cc: rt-users@lists.fsck.com
Subject: Re: [rt-users] Auto creating a default password for unpriviledged user

On Sun, Feb 08, 2004 at 02:20:34PM -0800, Jonathan Chen wrote:

OK I’ve found out why it didn’t work…

It was because I wanted a default password for a newly created user that caused RT to stop creating a new ticket via email. After I changed back the settings from “Password => xyz111,” to “Password => undef,” ticket creation via email worked again.

undef is a special value in perl.

Had you had:

Password => 'xyzzy', 

it would have been fine.

Request Tracker... So much more than a help desk — Best Practical Solutions – Trouble Ticketing. Free.

Thanks for the quick reply Jesse.

I didn’t know you had to enclose the default password with " ’ "

If you’re interested, there’s a handy perl module for creating decent
passwords, Crypt::GeneratePassword. Here’s an example:

#!/usr/bin/perl -w

use strict;
use Crypt::GeneratePassword qw(word chars);

my $word = word(
1, # min length
10, # max length
“en”, # language
3, # number of symbols to use
0, # number of caps to use
0.001, # minfreq (0.00 - 1.00) # higher values are more
0.05 # avgfreq (0.00 - 1.00) # pronouncable, but less secure
);

print “\npassword:\t$word\n\n”;

Andy Harrison
(full headers for details)