Skip to main content

Ricardo Mendes tip : How to reclaim or define a user as Administrator ?
I'm using at work ( and we removed our orginal cloudron user that by default was set to admin role because it was the first user to login into our instance.

the result is we lost admin access to our own app but thanks to Cloudron and support teams this is how you can fix this situation (this can also happen outside of Cloudron usage)

$ cloudron login

to get your app id :
$ cloudron list (to get the app ID)
to get inside the app container :
$ cloudron exec --app

Log-in into mongodb :
$ > db.users.find({ roles: "admin" }) # should reveal nothing now
$ > db.users.update({ username: "YOURUSERNAME" }, { $set: {roles: [ "user", "admin" ] }})

Now the new admin should show up:
$ > db.users.find({ roles: "admin" })

and there we go, refresh your clients and your user should be admin !

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.