Resetting the password of the Redmine admin user
If no user other than admin has administrator privileges and you lose the password of the admin user, you can no longer administer Redmine. In this case, you can forcibly change the password of the admin user.
Procedure
Open a command prompt on the server where Redmine is installed and perform the following steps.
1. Move to the Redmine installation directory
Move to the directory where Redmine is installed.
Example:
cd /var/lib/redmine
2. Open the Rails console
Run the following command to open the Rails console.
bundle exec rails console production
3. Get the object for the admin user and update the password
>> User.find_by_login('admin').update!(password: 'new password')
4. Exit the Rails console
>> quit
The work is now complete. The admin user can log in with the new password.
Normal procedure for resetting a password
The procedure above is for emergencies, such as when you cannot log in to Redmine as a user who has administrator privileges.
If you can log in as a user who has administrator privileges, open "Administration" → "Users" in Redmine and set a new password on the edit screen of each user.
