Search code examples
cassandracqlsh

InvalidRequest: code=2200 [Invalid query] message="unconfigured table credentials"


I'm trying to reset the cassandra user's password as suggested here:

UPDATE system_auth.credentials SET salted_hash = '$2a$10$H46haNkcbxlbamyj0OYZr.v4e5L08WTiQ1scrTs9Q3NYy.6B..x4O' WHERE username='cassandra';

I'm getting the following error:

InvalidRequest: code=2200 [Invalid query] message="unconfigured table credentials"

My client is cqlsh 5.0.1.

How can I reset the cassandra password?

Cassandra was installed from datastax-ddc-3.7.0-1.noarch.rpm

Cassandra version is 3.7.0


Solution

  • In Cassandra 2.2 table name changed
    Check the Cassandra Release News

    New table is roles

    CREATE TABLE system_auth.roles (
        role text PRIMARY KEY,
        can_login boolean,
        is_superuser boolean,
        member_of set<text>,
        salted_hash text
    );
    

    Use the below query :

    UPDATE system_auth.roles SET salted_hash = '$2a$10$1PzCxcMNKgsBEcI1lf.ndut24xyO0N2LzRdRF1tzaMaSH9KFLz/0u' WHERE role = 'cassandra';