DEFINITIONS
Definitions More Info.
Definition ID
12.106
Title
POSTGRESQL
Category
NOTES
Definition
disable and enable users logins
Definition Description
/*disable logins */
select 'ALTER ROLE '||usename||' NOLOGIN;'
from pg_catalog.pg_user
WHERE usename NOT IN ('replusr','zabbix','postgres','root');
/* enable login */
select 'ALTER ROLE '||usename||' LOGIN;'
from pg_catalog.pg_user
WHERE usename NOT IN ('replusr','zabbix','postgres','root');
RecordBy
cunay
Record Date
12-09-2023 17:48:57
Düzenle
Kopyala
Sil