diff --git a/debian/README.Debian b/debian/README.Debian index 1093592e1c..c63bfd710c 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -132,7 +132,7 @@ Migrating from non-Debian gitlab Resetting admin password without web interface ============================================== The steps involve dropping into rails console as gitlab user for production environment and then resetting the admin password via the user object. - $ runuser -u gitlab -- sh -c 'cd /usr/share/gitlab && . /etc/gitlab/gitlab-debian.conf && export DB RAILS_ENV && bundle exec rails console production' + $ gitlab-rails-console irb(main):001:0> user = User.where(admin: true).first irb(main):002:0> user.password = 'secret_pass' irb(main):003:0> user.password_confirmation = 'secret_pass' @@ -141,7 +141,7 @@ The steps involve dropping into rails console as gitlab user for production envi Granting an existing user admin access ====================================== The steps involve dropping into rails console as gitlab user for production environment and running the following commands. - $ runuser -u gitlab -- sh -c 'cd /usr/share/gitlab && . /etc/gitlab/gitlab-debian.conf && export DB RAILS_ENV && bundle exec rails console production' + $ gitlab-rails-console irb(main):001:0> user = User.find_by(email: 'useraddress@domain') irb(main):003:0> user.admin=true irb(main):004:0> user.save