Admin area is not visible in the Gitlab CE V 12.8.7

Hello,

We have an old Gitlab CE server v 12.8.7 used for our mainframe integration. Now we are trying to explore more on Git branching, merging. We don’t have a root / admin id for this server. We were trying to create a admin user but the admin area is not available. Can any one help how to create admin user or to enable admin area

There is no way to do that through the web UI, but if you have access to the server GitLab runs on there’s a way, but it’s a little convoluted.

First step is to define a personal access token (that you know) for the existing admin user, there used to be some hard-to-find documentation describing how to do that on-line, but the page I had bookmarked has changed, not to include that :disappointed: - but in our configuration management (we use chef - like gitlab does - when bootstrapping a new server we do something similar) we have a command like:

 command ["gitlab-rails", "runner", "User.admins.last.personal_access_tokens.create(name: 'apitoken', token_digest: Gitlab::CryptoHelper.sha256('#{token}'), impersonation: true, scopes: [:api])"]

Then you can use this token to access the API, and create a new admin user (check the documentation on the Users API, that is actually decent. I think you might be able to change the password of the existing “root” users through the API, but I haven’t tried that.

@grove Thank You for the guidance. We are able to reset the password for root user using https://docs.gitlab.com/ee/security/reset_root_password.html. Thank you.

1 Like

Oh yeah, I completely forgot about that procedure, probably easier (but harder to automate) than what I was suggesting.