Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

No admin user after activating ldap

Open Tharnas opened this issue 11 years ago • 16 comments

Hi,

After ldap is enabled and the (local) admin logs out there is no way to log in again with administrator privileges. (as local users are disabled when ldap is activated)

The local admin probably would need to grant the admin role to an ldap user before he logs out but if he doesn't I think the only way is to grant it through database.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Tharnas avatar Oct 11 '15 22:10 Tharnas

:+1:

ninja- avatar Oct 12 '15 06:10 ninja-

+1

Theaxiom avatar Oct 12 '15 21:10 Theaxiom

Some kind of hard to ignore warning before you enable the feature would be good. One that contains instructions, or links to some, would definately help. A good starting point could be a warning at the top of the LDAP wiki page, with how to fix it if you screw up would be a good start.

emcguinness avatar Oct 12 '15 22:10 emcguinness

Absolutely or at the very least always allow initial admin to login unless the account is deleted (which only an admin could do)

geekgonecrazy avatar Oct 13 '15 01:10 geekgonecrazy

So, how do I change a user to be admin if this happened? I'm the docker image...

hameno avatar Oct 22 '15 05:10 hameno

@hameno If you're locked out you can change your user to be an admin in mongo db directly.

Dbzman avatar Oct 22 '15 06:10 Dbzman

Yeah, figured that out. Wasn't easy or documented though, the wiki article is also outdated, as it shows an "admin" field while I had to change the roles.

For reference:

  • docker exec into rocketchat_db
  • mongo
  • then follow https://github.com/RocketChat/Rocket.Chat/wiki/Creating-the-First-Admin except when updating you should change the roles, search for the first user for reference how the role should look like

hameno avatar Oct 22 '15 07:10 hameno

Thanks for pointing that out, @hameno . Could you please update the mentioned wiki article in order to reflect up-to-date, reproducible steps?

gmsecrieru avatar Oct 22 '15 12:10 gmsecrieru

While following the above step, while executing meteor, its building application and stopping at, Errors prevented startup:

While processing files with templating (for target web.browser): bundle/programs/web.browser/app/fonts/fontello.html:1: Expected one of: , ,