ALTER USER (Deprecated)
Alter existing user options.
Deprecated.
|
Superusers can change a user’s password, hashed password, or superuser status.
To prevent disabling all superusers, superusers cannot change their own superuser status.
Ordinary users can change only their own password or hashed password.
Enclose the user name in single quotation marks if it contains non-alphanumeric characters.
Enclose the password or hashed password in single quotation marks.
See CREATE ROLE for more information about SUPERUSER
and NOSUPERUSER
.
Synopsis
ALTER USER <user_name> ( WITH PASSWORD '<user_password>' | WITH HASHED PASSWORD '<hashed_user_password>' ) [ ( SUPERUSER | NOSUPERUSER ) ] ;
Syntax legend
Syntax conventions | Description |
---|---|
UPPERCASE |
Literal keyword. |
Lowercase |
Not literal. |
|
Variable value. Replace with a user-defined value. |
|
Optional.
Square brackets ( |
|
Group.
Parentheses ( |
|
Or.
A vertical bar ( |
|
Repeatable.
An ellipsis ( |
|
Single quotation ( |
|
Map collection.
Braces ( |
Set, list, map, or tuple.
Angle brackets ( |
|
|
End CQL statement.
A semicolon ( |
|
Separate the command line options from the command arguments with two hyphens ( |
|
Search CQL only: Single quotation marks ( |
|
Search CQL only: Identify the entity and literal value to overwrite the XML element in the schema and solrConfig files. |
Examples
Alter a user’s password:
ALTER USER moss WITH PASSWORD 'bestReceiver';
Alter a user’s hashed password:
ALTER USER moss WITH HASHED PASSWORD '$2a$10$xsAJKfU.ZUzcuM9REniQoO8jUzBx0B.ChEl5w86TFcOv5ZhARo/uq';
Alter a user to make them a superuser:
ALTER USER moss SUPERUSER;