When I tried
REVOKE ALL PRIVILEGES ON DATABASE postgres from admin;
but the user admin
is still able to connect to postgres
remotely via pgadmin
after that.
How do I completely revoke an user's access to a database?
postgresql
When I tried
REVOKE ALL PRIVILEGES ON DATABASE postgres from admin;
but the user admin
is still able to connect to postgres
remotely via pgadmin
after that.
How do I completely revoke an user's access to a database?
Best Answer
The right to connect is by default granted to
PUBLIC
. You would have to revoke it fromPUBLIC
(and then grant it individually to other users who need it) to accomplish what you want.Or use
pg_hba.conf
to deny the connection.