ALTER ROLE
Synopsis
The ALTER ROLE statement changes the properties of an existing role.It allows modifying properties SUPERUSER, PASSWORD, and LOGIN.
This statement is enabled by setting the YB-TServer configuration option use_cassandra_authentication to true.
Syntax
Diagram

Grammar
1. alter_table ::= ALTER ROLE role_name WITH role_property [ AND role_property ...];
3. role_property ::= PASSWORD = '<Text Literal>'
4. | LOGIN = <Boolean Literal>'
5. | SUPERUSER = '<Boolean Literal>'
Where
role_nameis a text identifier.
Semantics
- An error is raised if
role_namedoes not exist.
Examples
You can do this as shown below.
1. cqlsh:example> CREATE ROLE finance;
1. cqlsh:example> ALTER ROLE finance with LOGIN = true;
1. cqlsh:example> ALTER ROLE finance with SUPERUSER = true;
1. cqlsh:example> ALTER ROLE finance with PASSWORD = 'jsfp9ajhufans2' AND SUPERUSER = false;
