Bulk Adding Users

I have looked hard at the wiki and done extensive searching on the
general web but can’t seem to find any reference as to how to bulk
upload users. In can dump the users directly into the database (I am
assuming) but the passwords will need to be encrypted. I have a utility
which will bulk encrypt passwords using md5sum. Is this the encryption
method for RT? Will I need to update any other table other than
RT-users? In our situation, it’s a “closed shop” and the potential
users are all known.

I have been trying to make the MS active directory authentication work
but have had to give up on that.

I am using (via RPM install on Mandriva) version 3.4.5.

Thanks in advance,

Rick

Hi Rick,

I had the same large userbase import issue, and ended up writing a Perl
script to process a CSV file into a format that the ‘rt’ binary[1] could
handle, then pass off the commands directly to it. The syntax that ‘rt’
uses is explained briefly in the binary’s help file, but basically ‘rt
create user Name=“” EmailAddress=“” RealName=“”’ is a good place to
start.

I guess I should extend the script to allow processing of a CSV/TSV file
that is directly posted/piped to it!

HTH

[1] Located in $RTHOME/bin

Regards,
Sasha

Sasha Gerrand
Web & Database Developer

Austbrokers Holdings Limited
Level 21, 111 Pacific Highway
North Sydney NSW 2060
PO Box 1813 North Sydney NSW 2060

Ph: 02 9935 2230
Mobile: 0431 895 718
Email: sashag@austbrokers.com.au
Web: http://www.austbrokers.com.au

NOTICE
If you are not an authorised recipient of this email, please contact
Austbrokers Holdings immediately by return e-mail or by telephone on
+61-2-4920-6117. In this case, you should not read, print, re-transmit,
store or act on this e-mail or any attachments. Please destroy the
message and attachments. This e-mail and any attachments are
confidential and may contain legally privileged information and/or
copyright material of Austbrokers Holdings or third parties. You should
only re-transmit, distribute or commercialise the material if you are
authorised to do so. Internet e-mails are not necessarily secure,
Austbrokers Holdings does not accept responsibility for changes made to
this message after it was sent. This Notice should not be removed.-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Rick
Phillips
Sent: Saturday, 17 March 2007 3:56 PM
To: rt-Users
Subject: [rt-users] Bulk Adding Users

I have looked hard at the wiki and done extensive searching on the
general web but can’t seem to find any reference as to how to bulk
upload users. In can dump the users directly into the database (I am
assuming) but the passwords will need to be encrypted. I have a utility
which will bulk encrypt passwords using md5sum. Is this the encryption
method for RT? Will I need to update any other table other than
RT-users? In our situation, it’s a “closed shop” and the potential
users are all known.

I have been trying to make the MS active directory authentication work
but have had to give up on that.

I am using (via RPM install on Mandriva) version 3.4.5.

Thanks in advance,

Rick

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com Commercial support:
sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Hi,

i’m using this tiny scrip:

#!/usr/bin/perl
use strict;
use warnings;

BEGIN { die “You must define $RT_HOME\n”
unless exists $ENV{RT_HOME} };
use lib “$ENV{RT_HOME}/lib”;

use RT;
RT::LoadConfig();
RT::Init();

use RT::Interface::CLI qw(GetCurrentUser loc);
use RT::Tickets;

my $CurrentUser = GetCurrentUser();
die loc(“No RT user found.\n”) unless ($CurrentUser->Id);
die “We need exactly 2 Arguments, Name & Email\n” unless ($#ARGV==1);
my $UserName=shift @ARGV;
my $Email=shift @ARGV;
my $User = RT::User->new($CurrentUser);
my
($id,$Message)=$User->Create(Name=>$UserName,EmailAddress=>$Email,Privileged=>1,Password=>‘changeme’);
if ($id){
print $Message.“\n”;
}
else{
print"This is a error!\n$Message\n";
}

Its from jesse from an older training. its working fine for me.

Torsten2007/3/17, Rick Phillips rickp@suntech.net.au:

I have looked hard at the wiki and done extensive searching on the
general web but can’t seem to find any reference as to how to bulk
upload users. In can dump the users directly into the database (I am
assuming) but the passwords will need to be encrypted. I have a utility
which will bulk encrypt passwords using md5sum. Is this the encryption
method for RT? Will I need to update any other table other than
RT-users? In our situation, it’s a “closed shop” and the potential
users are all known.

I have been trying to make the MS active directory authentication work
but have had to give up on that.

I am using (via RPM install on Mandriva) version 3.4.5.

Thanks in advance,

Rick


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

MFG

Torsten Brumm

http://www.torsten-brumm.de