Rocket.chat: No admin user after activating ldap

Created on 12 Oct 2015  路  16Comments  路  Source: RocketChat/Rocket.Chat

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.

oauth / sso improvement

Most helpful comment

Hi,

Somehow i fixed this. From the mongo command line, I disabled the ldap "db.rocketchat_settings.update( { _id: "LDAP_Enable"}, { $set: {value: false} } )"

And logged into the general authentication, post gave ADMIN rights to one of the LDAP user, finally again activated LDAP settings from the web console.

:)

All 16 comments

:+1:

+1

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.

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

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

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

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:

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

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: , ,