From c406bce4b57fade307bf4b563b8084f97b943cff Mon Sep 17 00:00:00 2001 From: Karen Carias <karen@gitlab.com> Date: Thu, 7 May 2015 16:48:25 +0000 Subject: [PATCH] Deleted > and commented "or" out --- doc/security/reset_root_password.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/security/reset_root_password.md b/doc/security/reset_root_password.md index 58c7b0e5a77..dbbe6c3e45d 100644 --- a/doc/security/reset_root_password.md +++ b/doc/security/reset_root_password.md @@ -5,7 +5,7 @@ Log into your server with root privileges. Then start a Ruby on Rails console. Start the console with this command: ```bash -> gitlab-rails console production +gitlab-rails console production ``` Wait until the console has loaded. @@ -14,15 +14,19 @@ There are multiple ways to find your user. You can search for email or username. ```bash irb(main):001:0> u = User.where(id: 1).first +``` + or + +```bash user = User.find_by(email: 'admin@local.host') ``` Now you can change your password: ```bash -> u.password = 'secret_pass' -> u.password_confirmation = 'secret_pass' +u.password = 'secret_pass' +u.password_confirmation = 'secret_pass' ``` It's important that you change both password and password_confirmation to make it work. @@ -30,7 +34,7 @@ It's important that you change both password and password_confirmation to make i Don't forget to save the changes. ```bash -> u.save! +u.save! ``` -Exit the console and try to login with your new password. +Exit the console and try to login with your new password. \ No newline at end of file -- GitLab