<div>Thanks to Ruslan and his piece of code i was able to right this script. It will be helpfull to anyone upgrading to RT 3.4.5 , and people who use to rt database to authentacate users for other pieces of software. It seems RT 3.4.5 uses an MD5 HEX encoding system, but for backwards compatability it can read MD5 base64 encoded passwords. However as users log into the new system the passwords are re-encoded and stored in the new HEX format. This script will change all the passwords to HEX and leave any blank passwords alone. Hope this helps :)</div>  <div> </div><FONT size=1>  <div>#!/usr/bin/perl</div>  <div></div>  <div># load module</div>  <div>use DBI;</div>  <div>use MIME::Base64 qw();</div>  <div>use bytes;</div>  <div></div>  <div></div>  <div>#query</div>  <div>my $query = qq(</div>  <div>SELECT *</div>  <div>From Users</div>  <div>WHERE CHAR_LENGTH(Password)< 32 AND (CHAR_LENGTH(Password) != 0) AND (CHAR_LENGTH(Password) != 13)</div>  <div>);</div> 
 <div></div>  <div># connect</div>  <div>my $dbh = DBI->connect("DBI:mysql:database=rt3;host=localhost", "root", "", {'RaiseError' => 1});</div>  <div></div>  <div>my $sth = $dbh->prepare($query);</div>  <div>$sth->execute();</div>  <div></div>  <div># iterate through resultset</div>  <div># print values</div>  <div>while(my $ref = $sth->fetchrow_hashref()) {</div>  <div>$old_encoded_pwd = $ref->{'Password'};</div>  <div>my $md5 = MIME::Base64::decode($old_encoded_pwd);</div>  <div>$md5 =~ s/(.)/sprintf "%02x",ord($1)/gmse;</div>  <div>print "User: $ref->{'Name'}\n";</div>  <div>print "Password: $ref->{'Password'}\n";</div>  <div>print "New Password: '$md5'\n";</div>  <div></div>  <div># execute INSERT query</div>  <div>my $rows = $dbh->do("update Users SET Password= '$md5' WHERE Name='$ref->{Name}';");</div>  <div>print "$rows row(s) affected\n";</div>  <div>print "----------\n";</div>  <div>}</div>  <div></div>  <div># clean up</div> 
 <div>$dbh->disconnect();</div></FONT><p>
                <hr size=1>Yahoo! Messenger with Voice. <a href="http://us.rd.yahoo.com/mail_us/taglines/postman1/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com">Make PC-to-Phone Calls</a> to the US (and 30+ countries) for 2¢/min or less.