Disabled login, now cant login


(James Ramm) #1

So, I foolishly disabled all the login options in the admin settings of my discourse installation.
Then I logged out.
Now I can’t log in. When I click ‘login’, the login box is completely empty.

Silly I know, but is there any way to restore?


(Régis Hanol) #2

You’ll have to SSH into your server, cd /var/discourse, ./launcher enter app and then rails c to changes the values of some of the SiteSettings :wink:


(Jens Maier) #3

If you have access to the server, sure:

/var/discourse/launcher ssh app
rails c
SiteSetting.enable_local_logins = true

(Jens Maier) #4

So, about those presence features… perhaps Discourse also needs an “@user is composing a reply” indicator? :laughing:


(Régis Hanol) #5

I would still continue writing my reply :wink:


(James Ramm) #6

Thanks!
Yes perhaps it does…

It was a misguided attempt to enable users to post stuff without logging in (we are just running it on a local intranet, so trust everyone :smile:).

Anyway to login with windows/microsoft credentials?


(Jens Maier) #7

Someone recently built an Active Directory SSO provider:

There’s also GitHub - sneridagh/osiris: OAuth 2.0 compliant token server with authentication proxy capabilities which is an OAuth provider backed by LDAP that you should be able to hook up to your AD. The difference to the other method is that this can be one login provider amongst many (i.e. you could choose to login with Google, Github or your AD login) while the other thing completely replaces Discourse’s login mechanisms.


(Sam Saffron) #8

Note, this is to be avoided and is now deprecated … instead use:

./launcher enter app

(Quan Minh Tran) #9

I installed discourse, the site http://diendanhoctap.edu.vn:247/, when user login its show the 502 Bad Gateway error, can you please help me fix the error ?