typora/note/devops/gitlab/更改 root 用户密码.md
2024-12-12 10:48:55 +08:00

202 B

sudo 权限用户

sudo gitlab-rails c -e production

console 输入

user = User.find_by_name("root")
user.password = "xxxxxxxx"
user.password_confirmation = "xxxxxxxx"
user.save!