• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to reset Gitlab admin password On CentOS 8.1

  • 01:14 gitlab-rails console -e production
  • 01:57 user =User.where(id:1).first
  • 02:25 user.password = 'password'
  • 02:53 user.password_confirmation = 'password'
  • 03:34 user.save!
{{postValue.id}}

To Reset GitLab Admin Password On CentOS 8.1

INTRODUCTION:

Gitlab admin password is simply changed by using the gitlab-rails command. The Rails console. gives a way to link with the GitLab instance from the command line. It is for administrators of the GitLab system to troubleshooting problems or needs to retrieve data.

Procedure:

Start A Ruby On Rails console using the following command

[root@linuxhelp ~]# gitlab-rails console -e production
--------------------------------------------------------------------------------
 GitLab:       13.5.4 (7f5f940041c) FOSS
 GitLab Shell: 13.11.0
 PostgreSQL:   11.9
--------------------------------------------------------------------------------
Loading production environment (Rails 6.0.3.3)
irb(main):058:0> user = User.where(id:1).first
=> #<User id:1 @root>
Create password  and after it make it confirm again using following command
irb(main):059:0> user.password = 'Abhishek@net123'
=> "Abhishek@net123"
irb(main):060:0> user.password_confirmation ='Abhishek@net123'
=> "Abhishek@net123"
Now save it using the following command
irb(main):063:0> user.save!
Enqueued ActionMailer::MailDeliveryJob (Job ID: 50536092-d78e-4645-808f-2fbd492b3256) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", {:args=>[#<GlobalID:0x00007f3e7a757c58 @uri=#<URI::GID gid://gitlab/User/1>>]}
=> true

Now go to browser and login with new password snap1 Login got successful snap2

With this method, the password reset process in GitLab for admin comes to an end.

Tags:
jackson
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What are GitLab rails?

A

The Rails console. provides a way to interact with your GitLab instance from the command line. The Rails console is for GitLab system administrators who are troubleshooting a problem

Q

What is the command to change the password?

A

The command to change the password is the user.password ='Newpassword'

Q

How can we change the password?

A

We can change the password using the user name or email id.

Q

What is the command to enter in GitLab rails?

A

The command to enter in GitLab rails is gitlab-rails console -e production

Q

Which command is used to save the GitLab password?

A

The command used to save the GitLab password is
u.save!

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Elijah ?
Remote Desktop Connection Has Stopped Working

When accessing my remote machine server using remote desktop on a windows machine I am getting this error

forum (1)

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.