Accidently removed admin access from all accounts

Moderator: crythias

Locked
jwfg
Znuny newbie
Posts: 3
Joined: 22 Mar 2011, 17:23
Znuny Version: 3.0.6

Accidently removed admin access from all accounts

Post by jwfg »

Firstly, D'oh!

I was moving users into groups and accidently unticked all boxes on all accounts. Don't ask how i did this, i think i was just on autopilot and managed to overlook what i was actually doing.

I have access to the db via phpmyadmin; is there anything i can do to restore access to at least 1 account so i can restore all others?

Cheers.
thomkortekaas
Znuny newbie
Posts: 61
Joined: 17 Dec 2010, 13:22
Znuny Version: 3.0

Re: Accidently removed admin access from all accounts

Post by thomkortekaas »

Go to table "users"
Check which id is linked to your account.

In the first column you'll see the id's and in the second column the username

Go to table "group_users".
The 'user_id' is the ID you just found in the "üsers" table.

You'll see that an user_id comes up multiple times in the first column, in the second column you'll see the group_id.
group_id 2 is the "admin group" (by default).

Create a new record with you user_id and give set following values:

Code: Select all

- group_id  = 2
- permission_key = rw
- permission value = 1
- create time = current timestamp
- create by = your user_id
- change_time = current timestamp
- change _by = you user_id
Haven't tried it but i'm pretty sure this should work.
OTRS 3.0.7 with MySQL on Windows server 2003 r2 server with AD integration for customers.
ferrosti
Znuny superhero
Posts: 723
Joined: 10 Oct 2007, 14:30
Znuny Version: 3.0
Location: Hamburg, Germany

Re: Accidently removed admin access from all accounts

Post by ferrosti »

It´s more easy using

Code: Select all

$OTRS_HOME/bin/otrs.AddUser2Group.pl
openSuSE on ESX
IT-Helpdesk: OTRS 3.0
Customer Service: OTRS 3.0 (upgraded from 2.3)
Customer Service (subsidiary): OTRS 3.0
+additional test and development systems
jwfg
Znuny newbie
Posts: 3
Joined: 22 Mar 2011, 17:23
Znuny Version: 3.0.6

Re: Accidently removed admin access from all accounts

Post by jwfg »

thomkortekaas wrote:Go to table "users"
Check which id is linked to your account.

In the first column you'll see the id's and in the second column the username

Go to table "group_users".
The 'user_id' is the ID you just found in the "üsers" table.

You'll see that an user_id comes up multiple times in the first column, in the second column you'll see the group_id.
group_id 2 is the "admin group" (by default).

Create a new record with you user_id and give set following values:

Code: Select all

- group_id  = 2
- permission_key = rw
- permission value = 1
- create time = current timestamp
- create by = your user_id
- change_time = current timestamp
- change _by = you user_id
Haven't tried it but i'm pretty sure this should work.
excellent, worked like a charm, thank you :)
Locked