Thank you!  That is exactly what I was missing.  I tried looking through some other Perl scripts already in the folder to see what to "use," but hadn't run across those.  I figured it would tell me, too, if it needed anything else sourced.  At any rate, that fixed the problem.<br>
<br>One other thing, it turns out that<br><br>$user->SetDisabled();<br><br>doesn't actually work, as it needs a variable.  SetDisabled(1) will disable account, while SetDisabled(0) will actually re-enable the account.  Threw me off at first, but I'm good now.<br>
<br>Thanks again for the help!<br><br>- Aaron<br><br><div class="gmail_quote">On Tue, Sep 18, 2012 at 7:27 AM, Tim Cutts <span dir="ltr"><<a href="mailto:tjrc@sanger.ac.uk" target="_blank">tjrc@sanger.ac.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On 17 Sep 2012, at 22:54, aaronr <<a href="mailto:robinsonaarond@gmail.com">robinsonaarond@gmail.com</a>> wrote:<br>
<br>
><br>
> I am looking for this same information.<br>
><br>
> I found this program from a few years ago, which is supposed to disable a<br>
> user:<br>
><br>
> ---------<br>
> #! /usr/bin/perl -w<br>
><br>
> use lib '/srv/www/rt4/lib';<br>
><br>
><br>
> use RT::Base;<br>
> use RT::Config;<br>
> use RT::User;<br>
><br>
><br>
> my $UserId = "sgeadmin";<br>
> my $user = RT::User->new($RT::SystemUser);<br>
> $user->Load($UserId);<br>
> $user->SetDisabled();<br>
> ---------<br>
<br>
</div>It's missing some preamble needed to initialise the RT perl API.  Something like this:<br>
<div class="im"><br>
#! /usr/bin/perl -w<br>
<br>
use lib '/srv/www/rt4/lib';<br>
<br>
</div>use RT;<br>
use RT::User;<br>
<br>
RT::LoadConfig;<br>
RT::Init;<br>
<div class="im"><br>
my $UserId = "sgeadmin";<br>
my $user = RT::User->new($RT::SystemUser);<br>
$user->Load($UserId);<br>
$user->SetDisabled();<br>
<br>
</div>Should work.<br>
<span class="HOEnZb"><font color="#888888"><br>
Tim<br>
<br>
--<br>
 The Wellcome Trust Sanger Institute is operated by Genome Research<br>
 Limited, a charity registered in England with number 1021457 and a<br>
 company registered in England with number 2742969, whose registered<br>
 office is 215 Euston Road, London, NW1 2BE.<br>
</font></span></blockquote></div><br>