Addbugzilla.pl
Jump to navigation
Jump to search
This was a quick script I whipped up in order to add user accounts to Bugzilla when we needed them. We had blocked account creation on the Bugzilla website from just anyone in order to block spammers.
#!/usr/bin/perl # We use strict, because that is a good thing. LWP::Simple is for connections # to the web. use strict; use LWP::Simple; my $email = $ARGV[0]; if (!$email) { print "Usage: addbugzilla.pl <email>\n"; exit; } print "User's full name: "; my $name = <STDIN>; $name =~ s/ /\%20/g; my $url = 'http://bugzilla.hpc.ufl.edu/createaccount.cgi?login=' . $email . '&realname=' . $name; my $content = get $url; print $name . " has been added to Bugzilla.\n";