文章標籤 ‘root’

GitLab 重設系統管理員 root 密碼

2016年6月13日 尚無評論

GitLab 如果忘掉了系統管理員 root 密碼時, 可以透過下列方式進行重建 :

  • sudo gitlab-rails console production
  • 接著在 irb(main):002:0 > 後方輸入 u = User.where(id:1).first
  • irb(main):002:0> u.password=’Password’ 輸入新的密碼
  • irb(main):003:0> u.password_confirmation=’Password’ 再一次輸入新的密碼
  • 最後儲存剛才的設定 irb(main):004:0>!
Categories: IT 雜工日誌 Tags: ,


2009年4月23日 尚無評論

很不錯的一篇文章,轉貼自Handle With Linux網站,有興趣的朋友可以參考看看。

A good password has the problem of being difficult to remember. And sometimes you might need to get in to a system where the root password is long forgotten (or left with the system administrator before you).
Luckily there are ways of getting access to systems without having the password. This is of course in a sense also a security risk. That’s why you should always be aware that having unattended physical access to a computer system means the same as having root access to the operating system. Unless the information on a system is encrypted, it’s only as save as the room it’s in.