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
to AllowAllAuthenticator and restart Cassandracqlsh
update system_auth.credentials set salted_hash='$2a$10$vbfmLdkQdUz3Rmw.fF7Ygu6GuphqHndpJKTvElqAciUJ4SZ3pwquu' where username='cassandra';
cqlsh
Now you can log in with
cqlsh -u cassandra -p cassandra
and change the password to something else.