Changing a site administrator

Hi, there!
I am new in this forum and have few knowledge about programming.
I needed some help when I used the OCS for the first time and invited one person to be a site administrator. I am an owner of the web where the System was installed and then used for hosting the PSST conferences ( It worked perfectly!
After holding various editions I want to change the Administrator for this conference site. I want to take over the PSST conferences and change the initial Administrator selected at the beginning to myself. How I can do it? Could you help me?
Thank you in advance,

Hi @eumat,

There are two options, each with a couple of discussions in the forum:

I suspect the first is the best option. Note that the SQL queries in the above link assume MD5 encryption; you’ll likely be using SHA1 encryption. You can check the encryption setting in your to be sure.

Alec Smecher
Public Knowledge Project Team

How can I create a second Site Administrator? [version:] the table roles doesn´t exist.

Hi @Evandro_Souza,

Check what the user group ID of your administrators group is by running:

SELECT user_group_id FROM user_groups WHERE context_id=0 AND role_id=1;

It’ll probably give you a 1 back as a result. Then, you can grant that to your user:

INSERT INTO user_user_groups (user_id, user_group_id) VALUES (1234, 1);

…where 1234 is your user ID, and 1 is the user_group_id you got from the first query (probably a 1).

Alec Smecher
Public Knowledge Project Team

1 Like

Thank you, @asmecher!

It´s solved.

Evandro Souza

This too worked for me. A++ would admin again. Thanks, @aschemer! :stuck_out_tongue:

1 Like

Hi @asmecher,

Could I add another Site Administrator, if I haven’t got access to OCS files? I’m only administrator of the conference. I have got conference manager and site administrator roles.


Hi @Tautvydas_Tavoras,

In order to grant another Site Administrator, you’ll need access to your database (e.g. through a tool like phpMyAdmin). This is usually part of a CPanel login on a typical server.

Alec Smecher
Public Knowledge Project Team

Dredging up this thread, but I’m hitting an error.

mysql> INSERT INTO user_user_groups (user_id, user_group_id) VALUES (ndp, 1); ERROR 1054 (42S22): Unknown column 'ndp' in 'field list'

ndp is my username, I’m running OJS 3. Any ideas?

In SQL, string constants must be enclosed in quotes, as VALUES ("ndp", 1) for example. In this particular case, you need to use the numeric identifier for the user, not the username.

1 Like

Duh! I’m stupid. Thanks.

I had to promote an user to admin in order to use the translation plugin, did the SQL to insert its ID on admins user_user_group, but that didn’ work.

Am I missing anything? OJS 3.1.2-1