Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron <aaroncalderon@gmail.com>2018-07-18 19:06:31 +0300
committerRémy Coutable <remy@rymai.me>2018-08-29 18:35:36 +0300
commite7a4c3576eb1fea70b0bf38ace87a74e568b678e (patch)
tree106ce9ce06788bcf748d44232304d162a4bc297e /doc/security/unlock_user.md
parent22a2ab2be972c740164e66916eedc56509d4a7fd (diff)
Add instructions to unlock an account
Originally submitted at https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6578. Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'doc/security/unlock_user.md')
-rw-r--r--doc/security/unlock_user.md31
1 files changed, 31 insertions, 0 deletions
diff --git a/doc/security/unlock_user.md b/doc/security/unlock_user.md
new file mode 100644
index 00000000000..d5ecef7f605
--- /dev/null
+++ b/doc/security/unlock_user.md
@@ -0,0 +1,31 @@
+# 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:
+
+```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
+user = User.where(id: 1).first
+```
+
+or
+
+```bash
+user = User.find_by(email: 'admin@local.host')
+```
+
+Unlock the user:
+
+```bash
+user.unlock_access!
+```
+
+Exit the console, the user should now be able to log in again.