mirror of
https://github.com/moghtech/komodo.git
synced 2026-03-09 07:13:36 -05:00
Make new user super admin #116
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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?
@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}})@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 komodoYou will be asked for your password.
Once logged in, select the right database:
use komodoAnd then run the commands referenced above with the right username.
Personally, I think there should be a toggle for this in the interface.