How do I create users in the Cassandra shell?

I’m new to Cassandra and trying to deploy an application using Cassandra. I created a keyspace in my Cassandra DB but when I create my keyspace account I get an error like below

I have tried many ways like create user and create roles but it doesn’t work. The version I am using is 3.11.13

CREATE ROLE etl WITH PASSWORD = 'xxxxxx' AND LOGIN = true;
InvalidRequest: Error from server: code=2200 [Invalid query]
message="org.apache.cassandra.auth.CassandraRoleManager doesn't support PASSWORD"
CREATE ROLE
CREATE USER

>Solution :

The error indicates that you haven’t enabled authentication in your cluster.

The PASSWORD option is only supported if you have configured PasswordAuthenticator. By default, authentication is disabled in cassandra.yaml with:

authenticator: AllowAllAuthenticator

You need to configure the nodes with the password authenticator to enable authentication:

authenticator: PasswordAuthenticator

For details, see Enabling Password Authentication in Cassandra 3.11. Cheers!

Leave a Reply