Search code examples
cassandracql

How to list all users in the Cassandra shell?


In the CQL shell, how do I list all users? I can't seem to find it anywhere on Stack Overflow.


Solution

  • Prior to the introduction of roles in Cassandra 2.2, authentication and authorization were based around the concept of a USER.

    Cassandra 2.2 onward CQL uses database roles to represent users and group of users. So to list users use below command accordingly.

    LIST USERS;  -- cassandra version < 2.2
    
    LIST ROLES;  -- cassandra version >= 2.2