---
title: "ALTER ROLE"
url: "https://docs.yugabyte.com/stable/api/ycql/ddl_alter_role/"
---

# ALTER ROLE

Use the ALTER ROLE statement to change the properties of an existing role.

## Synopsis

Use the `ALTER ROLE` statement to change the properties of an existing role. It allows modifying properties `SUPERUSER`, `PASSWORD`, and `LOGIN`.

This statement is enabled by setting the YB-TServer flag [`--use_cassandra_authentication`](/stable/reference/configuration/yb-tserver/#use-cassandra-authentication "--use_cassandra_authentication") to `true`.

## Syntax

### Diagram

ALTERROLE[role\_name](/stable/api/ycql/grammar_diagrams#role-name)WITHAND[role\_property](/stable/api/ycql/grammar_diagrams#role-property)

### Grammar

```ebnf
alter_table ::= ALTER ROLE role_name WITH role_property [ AND role_property ...];

role_property ::=  PASSWORD = '<Text Literal>'
                 | LOGIN = <Boolean Literal>'
                 | SUPERUSER = '<Boolean Literal>'
```

Where

- `role_name` is a text identifier.

## Semantics

An error is raised if `role_name` does not exist.

## Examples

```sql
ycqlsh:example> CREATE ROLE finance;
```

```sql
ycqlsh:example> ALTER ROLE finance with LOGIN = true;
```

```sql
ycqlsh:example> ALTER ROLE finance with SUPERUSER = true;
```

```sql
ycqlsh:example> ALTER ROLE finance with PASSWORD = 'jsfp9ajhufans2' AND SUPERUSER = false;
```

## See also

- [CREATE ROLE](/stable/api/ycql/ddl_create_role "CREATE ROLE")
- [DROP ROLE](/stable/api/ycql/ddl_drop_role "DROP ROLE")
- [GRANT ROLE](/stable/api/ycql/ddl_grant_role "GRANT ROLE")
- [REVOKE ROLE](/stable/api/ycql/ddl_revoke_role "REVOKE ROLE")
- [GRANT PERMISSION](/stable/api/ycql/ddl_grant_permission "GRANT PERMISSION")
- [REVOKE PERMISSION](/stable/api/ycql/ddl_revoke_permission "REVOKE PERMISSION")
