Skip to content

Not given option to set root password in master

Summary

This is a problem with the current master when running in production mode.

After the root user is seeded into the database with no password, you are not given the ability to change the password when you navigate to the UI, and have no way to login.

Related to: https://gitlab.com/gitlab-org/gitlab-ce/issues/30248

Steps to reproduce

  1. Ensure the production db section is configured in your database.yml with a new db name that hasn't been created yet

  2. Run:

    RAILS_ENV=production bundle exec rake db:create db:schema:load db:seed_fu
  3. Navigate to the UI to login

What is the current bug behavior?

You are brought to the login screen, but you do not have a password to be able to login with

What is the expected correct behavior?

You are brought to the password reset screen, where you have the opportunity to set the root password

Possible fixes

The problem is that the password_automatically_set param is being stripped out in users/create_service.rb because it's not one of the permitted parameters.