厨师服务器密码重置 [英] Chef server password reset

查看:78
本文介绍了厨师服务器密码重置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Linux机器上安装并运行了自己的Chef服务器。当我访问厨师服务器用户界面时,询问我用户名和密码。不幸的是,我忘记了密码。我知道我的用户名是 admin

I installed and run my own Chef server in my linux machine. When I access my chef server UI it ask me username and password. Unfortunately I forgot my password. I know my user name is admin.

如何恢复密码?在用户界面中,也没有忘记密码选项。我更改了默认密码 p @ ssw0rd1 。但是我忘记了我所做的改变。

How can I recover my password? In the UI there is no forgot password option also. I changed the default password which is p@ssw0rd1. But I forgot what I have changed.

密码是存储在我的厨师服务器的任何位置还是还是要重置密码?

Is that password is stored in any location of my chef server or Is that anyway to reset my password? Thanks.

推荐答案

我想您现在唯一能做的就是登录数据库本身并在那里更改密码。

I guess the only thing you can do now is to login into database itself and change the password there.

Chef 12.2或更高版本中的数据库结构似乎已更改,因此根据您的版本,您应该使用以下命令

The database structure seems to have changed in Chef 12.2 or later, so based on your version you should use the following commands

(在Chef 12.2之前)

(Before Chef 12.2)

$ sudo -u opscode-pgsql  /opt/chef-server/embedded/bin/psql opscode_chef
psql# update osc_users set hashed_password = '$2a$12$y31Wno2MKiGXS3FSgVg5UunKG48gJz0pRV//RMy1osDxVbrb0On4W' , salt ='$2a$12$y31Wno2MKiGXS3FSgVg5Uu' where username ='admin';

(厨师12.2及以上)

(Chef 12.2 and above)

$ sudo -u opscode-pgsql  /opt/opscode/embedded/bin/psql opscode_chef
psql# update users set hashed_password = '$2a$12$y31Wno2MKiGXS3FSgVg5UunKG48gJz0pRV//RMy1osDxVbrb0On4W' , salt ='$2a$12$y31Wno2MKiGXS3FSgVg5Uu' where username ='admin';

管理员的新密码为 password。登录并通过Web界面进行更改。

The new password for admin is "password". Login and change it through web interface.

这篇关于厨师服务器密码重置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆