How to Identify the Root and Administrator Users for Our GitLab Account?

:hugs: Hello GitLab Community,

We need some assistance in identifying the root user and administrator for our GitLab account. Here’s a brief overview of our situation:

• Our GitLab instance has a primary group (let’s call it Group A), with 4 users assigned the role of Owner. Within Group A, we have created multiple sub-groups and projects.

• However, when we review the members list for Group A, none of the users are listed as an Admin or root user.

• Over time, several employees have left the company, which has made it challenging for us to track who originally held the root or administrator privileges for our GitLab account.

  • We are using Free version: GitLab 17.5

Could someone guide us on how to determine who the root user and admin are in our instance? Are there specific commands or settings we should check to uncover this information?

Thank you in advance for your help!

Versions

Please add an x whether options apply, and add the version information.

  • Self-managed
  • GitLab.com SaaS
  • Dedicated

Versions

  • Free version: GitLab 17.5

If you can get on your server, you can do this:

gitlab-psql
select id,username,name,admin from users where admin = 't';

if that doesn’t give any records, just do the command without the where admin = 't' part.

If one of the users still exists at your workplace then you can then login as that person and do whatever you need to do as an admin - like get them to give you admin rights or whatever. If the user doesn’t work there anymore, you can reset the password using the gitlab-rails console. Reset a user's password | GitLab explains on how to do that.

A working example from my server:

gitlabhq_production=# select id,username,name,admin from users where admin = 't';
 id |  username   |     name      | admin 
----+-------------+---------------+-------
  1 | root        | Administrator | t
  2 | iwalker     | Ian Walker    | t

Thank you @iwalker for responding. I am not sure if we have the access to server. Could you please share a link on how could we set it up?

Please note that the platform we are using is the free Gitlab.com (and not self-managed). The version is GitLab Enterprise Edition 17.5.0.

Ah so if you are using gitlab.com then you won’t have access. I thought you meant your own server.

You would have to contact Gitlab support: https://support.gitlab.com/hc/en-us/requests/new nobody on the forum can help with that.

2 Likes

GitLab.com SaaS is a multi-tenant SaaS where the only admins are GitLab infrastructure teams.

As a user, you can maintain groups as top-level namespace, with the highest role owner.

List owners in a group

Navigate into the group view and then Manage > Members in the left menu.

  1. Sort by Role

  2. Sort descending

    image

Then you should see the owner roles on top.

Example URL https://gitlab.com/groups/gitlab-da/-/group_members?sort=access_level_desc – the group is from the Developer Advocacy team.

Thank you @dnsmichi for your response. Yeah we have few owners for the groups. We have not been blocked by not having the admin access so far, but we wanted to get the admin access, just in case, for the future. Do you mean to say that we don’t really need to have admin access?

On gitlab.com, no you don’t need it.

1 Like

And you cannot get access, the highest access is a top-level group namespace with owner role for any user and customer.

A single-tenant option with administrative access would be GitLab Dedicated.

2 Likes

Thank you @dnsmichi @iwalker

1 Like