RecoverSuperUserRights

From Request Tracker Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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"'