System user password and email address lost after rebuild

(Tobias Eigen) #1

This is probably not a big priority for you discourse wizards out there, but I struggled a bit today trying to wrap my head around this issue. I think it’s a bug - maybe there are ways to clarify how system user is treated for those that come after us.

###My use case

I am setting up a new discourse instance and the organization wants to have a single admin account for managing users and admin settings. So you log out of your usual account for participating in discussions and log back in again as the admin.

I thought this was going to be the system user but it turns out this is impossible, so have now solved my problem by creating a new admin user and given it admin privileges. I also put the email address for this user (which is the same email they use for all their admin tasks throughout the organization) in the app.yml file in DISCOURSE_DEVELOPER_EMAILS so it will always get admin privileges.

###Why I can’t use system user for this purpose

Basically, the system password and email address cannot be changed permanently. To replicate:

  • edit system user and add email address and password . also add picture.
  • log in successfully as system user
  • run ./launcher rebuild app and wait for process to complete.
  • try to log in as system and fail. Log in as another user and you will see the email address and password have been lost.

###I knew already that the username can’t be changed:

(Sam Saffron) #2

This is not a bug.

system user is out of bounds, you should not be using it for anything. If you need a central admin account create an account called “admin”, its a better name anyway and you will not have password issues.