简体   繁体   中英

How to Grant 'ALTER USER' privileges to AWS redshift user

not able to grant 'ALTER USER' privileges to one of exsisting user in redshift cluster.

I have tried below statement but got error

GRANT ALTER USER TO or_user;

ERROR: Grant/Revoke system privilege on User is not supported.

GRANT permission only work for table, database, schema, function, procedure, language, or column.

You can try to do something like:

CREATE ROLE testrole;

GRANT ROLE testrole TO test1;

GRANT ALTER USER TO ROLE testrole;

I did this test:

CREATE USER test1 WITH PASSWORD 'Test1password';
CREATE USER test2 WITH PASSWORD 'Test2password';

CREATE ROLE testrole;

GRANT ROLE testrole TO test1;

GRANT ALTER USER TO ROLE testrole;

Than i connected with the test1 user and run:

ALTER USER test2 password 'Test5password';

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2025 STACKOOM.COM