Help, root no more a SuperUser

I’m in a trouble. While setting some user rights, it seems I’ve revoked
the superuser right of mu root (UID 1) user. Can someone guide me how to
fix this? A nice SQL statement to make my root superuser again?

Thank you in advance.

PS It’s urgent :frowning:

Boris Jordanov написа:

I’m in a trouble. While setting some user rights, it seems I’ve revoked
the superuser right of mu root (UID 1) user. Can someone guide me how to
fix this? A nice SQL statement to make my root superuser again?

y a copy at http://rtbook.bestpractical.com

Found the solution in the wiki, sorry for the panic :slight_smile:

Hi Boris,

Run the below command. This worked for me for the same situation. hope it
works for you as well.

perl -I /opt/rt3/lib -MRT -e’ RT::LoadConfig(); RT::Init(); my $u =
RT::User->new($RT::Systemuser); $u->Load(“root”); print
$u->PrincipalObj->GrantRight(Object => $RT::System, Right => “SuperUser”);

Thanks
Manohar-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Boris
Jordanov
Sent: Thursday, June 25, 2009 6:55 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Help, root no more a SuperUser

I’m in a trouble. While setting some user rights, it seems I’ve revoked
the superuser right of mu root (UID 1) user. Can someone guide me how to
fix this? A nice SQL statement to make my root superuser again?

Thank you in advance.

PS It’s urgent :frowning:
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Boris Jordanov пишет:

I’m in a trouble. While setting some user rights, it seems I’ve revoked
the superuser right of mu root (UID 1) user. Can someone guide me how to
fix this? A nice SQL statement to make my root superuser again?

Thank you in advance.

PS It’s urgent :frowning:


http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

correct me if i’m wrong - there’s a record in Principals table for each
user. u should use principal id for root.
so, first do a
select id from Users where Name LIKE ‘root’;

remember th id of root user

then

select id from Principals where Object id = [that number u remembered on
previous step]

remember this number too

then, finally, do a

insert into ACL values (NULL, ‘Group’, [that number u remembered on
previous step], ‘SuperUser’, ‘RT::System’, 1, 0, 0);

in my case both of id’s were 12.
but, i performed lots of different upgrades. so 12 probably won’t work.

good luck, and be careful :slight_smile:

br, alex