Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
0b936324
Commit
0b936324
authored
Apr 28, 2015
by
Karen Carias
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New file to add to security documentation, "How to reset your root password"
parent
822ba95f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
doc/security/reset_root_password.md
doc/security/reset_root_password.md
+36
-0
No files found.
doc/security/reset_root_password.md
0 → 100644
View file @
0b936324
# How to reset your root password:
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
```
Wait until the console has loaded.
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
user
=
User.find_by
(
email:
'admin@local.host'
)
```
Now you can change your password:
```
bash
>
u.password
=
'secret_pass'
>
u.password_confirmation
=
'secret_pass'
```
It's important that you change both password and password_confirmation to make it work.
Don't forget to save the changes.
```
bash
>
u.save!
```
Exit the console and try to login with your new password.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment