RecoverSuperUserRights

From Request Tracker Wiki
Revision as of 16:35, 6 April 2016 by Admin (talk | contribs) (2 revisions imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The following one-liner uses the RT API and the internal RT::SystemUser to grant the root user the superuser safely. You'll need to run this as a local user that can access the RT config file.

perl -I/opt/rt3/lib -MRT -e'RT::LoadConfig; RT::Init;
  my $u=RT::User->new($RT::SystemUser);
  $u->Load("root");
  ($val,$msg) = $u->PrincipalObj->GrantRight(Object=> $RT::System, Right => "SuperUser");
  print "$msg\n"'