cassandra - only superuser is allowed to perform CREATE USER queries

hawkeye picture hawkeye · Jun 14, 2014 · Viewed 9.6k times · Source

I'm logging in with on Ubuntu 14.10 on Cassandra 2.0.8 with Java 1.7.0_60-b19

cqlsh -u cassandra -p cassandra

I'm running:

CREATE USER a WITH PASSWORD 'a' NOSUPERUSER;

I'm getting the error:

Bad Request: Only superusers are allowed to perform CREATE USER queries

The problem with reasoning - I am logged in as the superuser.

My question is: If I'm logged into cqlsh as the Cassandra user, why am I told that I'm not the superuser?

Answer

kkmishra picture kkmishra · Jun 14, 2014

You need to enable PasswordAuthenticator in cassandra.yaml file. To enable PasswordAuthenticator you need to change authenticator property in cassandra.yaml

Change

authenticator: AllowAllAuthenticator

to

authenticator: PasswordAuthenticator

After that login with following command and then you will be able to add new user

cqlsh -u cassandra -p cassandra