Make new user super admin #116

Closed
opened 2025-10-31 15:02:36 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @cratedev on GitHub (Nov 4, 2024).

I installed Komodo with mongodb a while back, and was using local auth (account name: admin).

I then switched to using OIDC, but my OIDC user (server) is of course different. I'd like to make "server" the super admin, and remove "admin".

Is there a simple way to do that?

Originally created by @cratedev on GitHub (Nov 4, 2024). I installed Komodo with mongodb a while back, and was using local auth (account name: admin). I then switched to using OIDC, but my OIDC user (server) is of course different. I'd like to make "server" the super admin, and remove "admin". Is there a simple way to do that?
Author
Owner

@cratedev commented on GitHub (Nov 5, 2024):

I managed to figure it out after a lot of trial and error. Basically:
Run mongosh, connect to the komodo db, and then update the User collection:

db.User.updateOne({username: 'server'}, {$set:{admin:true}})

db.User.updateOne({username: 'server'}, {$set:{super_admin:true}})

@cratedev commented on GitHub (Nov 5, 2024): I managed to figure it out after a lot of trial and error. Basically: Run mongosh, connect to the komodo db, and then update the User collection: `db.User.updateOne({username: 'server'}, {$set:{admin:true}})` `db.User.updateOne({username: 'server'}, {$set:{super_admin:true}})`
Author
Owner

@mpkossen commented on GitHub (Oct 31, 2025):

For someone coming across this, you can connect to your MongoDB using the following command (replace 'komodo-mongo-1' with the name of your docker container):

docker exec -it komodo-mongo-1 mongosh "mongodb://localhost:27017" --username komodo

You will be asked for your password.

Once logged in, select the right database:

use komodo

And then run the commands referenced above with the right username.

Personally, I think there should be a toggle for this in the interface.

@mpkossen commented on GitHub (Oct 31, 2025): For someone coming across this, you can connect to your MongoDB using the following command (replace 'komodo-mongo-1' with the name of your docker container): `docker exec -it komodo-mongo-1 mongosh "mongodb://localhost:27017" --username komodo` You will be asked for your password. Once logged in, select the right database: `use komodo` And then run the commands referenced above with the right username. Personally, I think there should be a toggle for this in the interface.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/komodo#116