In Frappe if we disable user/pwd login, how do the administrator user login

Hi,

There is a flag in System settings, where we can disable user/pwd login. So, that only social login can be used.

If this flag is set how does the administrator user log in. Tried setting an email id for administrator. But, social login creates username as email id. So, setting email for administrator does not allow for administrator to log in. Any option how can this be done.

Friends any update?

Administrator is a special account that should almost never be used.
What you should do is log in using your account / a System Manager account.

In the extremely rare cases where you need to use the Administrator account (e.g. removing an email from the queue) and you can’t use command line / Frappe Cloud UI, you might be able to intercept the login code from the sent email.

Intercepting login codes from the Email Queue

Hacky procedure

  1. Go to “Login with Email” page
  2. Change input type to text
  3. Enter Administrator
  4. Click “Send login link”
  5. From another window, login using a System Manager account
  6. Go to the “Email Queue List”
  7. Grab the login link from the encoded email, and parse it manually


Email decoding example

   | [Login Link](https://your-site.example.com/api/method/frappe.www.login=
.login_via_key?key=3De279acc957a8f0a7fa7bedd124efe22851d48966f5456aec93746e=
21)  |

Replace =3D with =, remove = sign at end of lines.
In the example, you get:

https://your-site.example.com/api/method/frappe.www.login
.login_via_key?key=e279acc957a8f0a7fa7bedd124efe22851d48966f5456aec93746e21`
``

</details>
1 Like

I agree with @corentin , you shouldn’t use the Administrator login (unless you’re developing an app), and use the System Manager role instead.

If you’re on Frappe Cloud, you can login as Administrator from the site dashboard in FC. If you’re self hosted, there’s a bench command to login as Administrator.

https://frappeframework.com/docs/user/en/bench/frappe-commands#access-site-in-the-browser

2 Likes

Thank you for the reply. Yes. It is self hosted. This one requires login into the server.

Thank you for the reply. That is quite a hack :slight_smile: Agree we should sparsely or never use Administrator account.
But, given the fact that there is a flag to disable user/pwd login in frappe. And sometimes login as Administrator is required, there should be some built in way to use Administrator login in such scenario.