如何重置丢失的Cassandra管理员用户的密码? [英] How to reset a lost Cassandra admin user's password?
本文介绍了如何重置丢失的Cassandra管理员用户的密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以完全访问Cassandra安装文件和在 cassandra.yaml
中配置的PasswordAuthenticator。
I have full access to the Cassandra installation files and a PasswordAuthenticator configured in cassandra.yaml
. What do I have to do to reset admin user's password that has been lost, while keeping the existing databases intact?
推荐答案
我已经解决了这个问题,我需要做什么才能重置已丢失的管理员用户密码?以下步骤:
Solved with the following steps:
- 将
cassandra.yaml
中的验证者更改为AllowAllAuthenticator,然后重新启动Cassandra -
cqlsh
-
update system_auth.credentials set salted_hash =' $ 2a $ 10 $ vbfmLdkQdUz3Rmw.fF7Ygu6GuphqHndpJKTvElqAciUJ4SZ3pwquu'where username ='cassandra';
- 退出
cqlsh
li>
- 将验证码更改回PasswordAuthenticator并重新启动Cassandra
- Change authenticator in
cassandra.yaml
to AllowAllAuthenticator and restart Cassandra cqlsh
update system_auth.credentials set salted_hash='$2a$10$vbfmLdkQdUz3Rmw.fF7Ygu6GuphqHndpJKTvElqAciUJ4SZ3pwquu' where username='cassandra';
- Exit
cqlsh
- Change authenticator back to PasswordAuthenticator and restart Cassandra
现在您可以使用
cqlsh -u cassandra -p cassandra
并将密码更改为其他内容。
and change the password to something else.
这篇关于如何重置丢失的Cassandra管理员用户的密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文