cassandra - only superuser is allowed to perform CREATE USER queries

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

1 Find and open 'cassandra.yaml' file on your computer.

2 Find and delete 'authenticator: AllowAllAuthenticator' in the file.

3 Replace it with 'authenticator: PasswordAuthenticator'

4 Also, add this line : 'authorizer: CassandraAuthorizer '

Restart Cassandra. If you use brew, you can restart using

brew services restart cassandra

then log in to cql shell again:

cqlsh -u cassandra -p cassandra localhost;

create a new super user

CREATE ROLE WITH SUPERUSER = TRUE AND LOGIN = TRUE AND PASSWORD = '';

exit out of cassandra

exit

log in using the new super user login

cql -u

Then you enter your password and you're in!

https://gist.github.com/GHesericsu/83aca87b60c853945e242b3b9a6ceef0/edit