[rt-users] Restoring from backup -> admins lost privileges
Andrew Wippler
Andrew.Wippler at lancasterbaptist.org
Fri Feb 13 02:04:03 EST 2015
I had to restore my MySQL database from a backup. Once I restored the RT database, the privileged users no longer had rights.
I found the below snippets to remove/add super user to my account and verify privileged users, but they are stuck in self-service mode. How do I get the rights returned back to normal?
Granting rights:
perl -I/usr/share/request-tracker4/lib/ -MRT -e'RT::LoadConfig; RT::Init;
my $u=RT::User->new($RT::SystemUser);
$u->Load("awippler");
($val,$msg) = $u->PrincipalObj->GrantRight(Object=> $RT::System, Right => "SuperUser");
print "$msg\n"'
Finding privilege users: (my account is listed)
#!/usr/bin/perl
use lib "/usr/share/request-tracker4/lib";
use RT;
use RT::Users ;
use warnings;
RT::LoadConfig(); ## Loading RT config
RT::Init(); ## Initialise RT
my $users = new RT::Users(RT_System);
$users->LimitToPrivileged;
while ( $user = $users->Next) {
print $user->Name ;
}
exit;
Andrew Wippler | Director of IT | Lancaster Baptist Church | Dr. Paul Chappell, Pastor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150213/a7348872/attachment.htm>
More information about the rt-users
mailing list