Create administrator role cassandra
To avoid relying on the default cassandra superuser account, create a new administrator role and then delete the default user.
-
Create the
adminrole.CREATE ROLE admin WITH PASSWORD = '<authentication_admin_password>' AND LOGIN = true AND SUPERUSER = true;Replace
<authentication_admin_password>with the password you intend to use for theadminsuperuser account. -
Disconnect from the session.
Press Ctrl+D to exit the
cqlshshell. -
Reconnect as the new admin.
cqlsh -u admin -
Remove the default
cassandrauser.DROP ROLE cassandra;