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
admin
role.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 theadmin
superuser account. -
Disconnect from the session.
Press Ctrl+D to exit the
cqlsh
shell. -
Reconnect as the new admin.
cqlsh -u admin
-
Remove the default
cassandra
user.DROP ROLE cassandra;