Unverified Commit e7a4c357 authored by Aaron's avatar Aaron Committed by Rémy Coutable

Add instructions to unlock an account

Originally submitted at
Signed-off-by: 's avatarRémy Coutable <remy@rymai.me>
parent 22a2ab2b
......@@ -10,6 +10,7 @@ comments: false
- [Webhooks and insecure internal web services](webhooks.md)
- [Information exclusivity](information_exclusivity.md)
- [Reset your root password](reset_root_password.md)
- [Unlock a locked user](unlock_user.md)
- [User File Uploads](user_file_uploads.md)
- [How we manage the CRIME vulnerability](crime_vulnerability.md)
- [Enforce Two-factor authentication](two_factor_authentication.md)
......@@ -37,4 +37,4 @@ Don't forget to save the changes.
Exit the console and try to login with your new password.
\ No newline at end of file
Exit the console and try to login with your new password.
# How to unlock a locked user
Log into your server with root privileges. Then start a Ruby on Rails console.
Start the console with this command:
gitlab-rails console production
Wait until the console has loaded.
There are multiple ways to find your user. You can search for email or username.
user = User.where(id: 1).first
user = User.find_by(email: 'admin@local.host')
Unlock the user:
Exit the console, the user should now be able to log in again.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment