[rt-users] Quick Ticket Creation Box - and code to change passwords back to md5 base 64

Winn Johnston winn_johnston at yahoo.com
Mon May 8 09:58:28 EDT 2006


hello all,
   
  I have up graded to RT 3.4.5, everything seems to be working just fine. Except for the Quick Ticket Creation Box on the main page. After using the Quick Create ticket option, the ticket is never created. Using the long form it works. Am i missing an option that needs to be turned on in one of the configuration files? Thanks in advance.
   
  Also here below is some code you might find usefull. The RT 3.4.5 uses a hex encoded password, this is diffrent than the previous versions that use a base64 encoded password. If your shop is like ours then you copy the RT users database around the network and use it to authenticate users for other apps. Below is some perl code that will re-encode the new Hex format back to the base64.
   
  #!/usr/bin/perl
   # load module
 use DBI;
 use MIME::Base64 qw();
 use bytes;
  @mysqlcopy =(/usr/bin/mysqldump --host=rt.dnc.org -uroot --add-drop-table --compress --add-locks -e rt3 Users Groups CachedGroupMembers | /usr/bin/mysql --host=192.168.10.47 -uroot -plemon -C rt3);
system (@args);
  #query
my $query = qq(
        SELECT *
        From Users
        WHERE CHAR_LENGTH(Password)< 33 AND (CHAR_LENGTH(Password) != 13)
);
  # connect
my $dbh = DBI->connect("DBI:mysql:database=rt3;host=localhost", "root", "", {'RaiseError' => 1});
  my $sth = $dbh->prepare($query);
$sth->execute();
   # iterate through resultset
 # print values
  while(my $ref = $sth->fetchrow_hashref()) {
  $old_encoded_pwd = $ref->{'Password'};
my $md5 = MIME::Base64::encode(pack "H*", "$old_encoded_pwd");
  print "User: $ref->{'Name'}\n";
print "Password: $ref->{'Password'}\n";
        substr($md5,-3) ='';
        print "New Password: '$md5'\n";
          # execute INSERT query
               my $rows = $dbh->do("update Users SET Password= '$md5' WHERE Name='$ref->{Name}';");
               print "$rows row(s) affected\n";
               print "----------\n";
 }
   # clean up
  $dbh->disconnect();


		
---------------------------------
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20060508/e47fde17/attachment.htm>


More information about the rt-users mailing list