标签:arguments change password postgres user console cti sudo 修改root密码
在root用户下,执行
[root@localhost gitlab]# sudo gitlab-rails console production ------------------------------------------------------------------------------------- GitLab: 11.7.3 (3424476) GitLab Shell: 8.4.4 postgresql: 9.6.11 ------------------------------------------------------------------------------------- Loading production environment (Rails 5.0.7.1)
2.获得用户数据,修改用户密码
irb(main):001:0> u=User.where(id:1).first => #<User id:1 @root> irb(main):003:0> u.password=12345678 => 12345678 irb(main):004:0> u.password_confirmation=12345678 => 12345678 irb(main):005:0> u.save! Enqueued ActionMailer::DeliveryJob (Job ID: 15c3c8de-e839-4874-8104-d72dbe224756) to Sidekiq(mailers) with arguments: "DeviseMailer", "password_change", "deliver_now", #<GlobalID:0x00007f65d5b944d8 @uri=#<URI::GID gid://gitlab/User/1>> => true irb(main):006:0> quit
另:gitlab默认用户名密码 root 5ivel!fe
标签:arguments change password postgres user console cti sudo 修改root密码
原文地址:https://www.cnblogs.com/justuntil/p/10352786.html