aboutsummaryrefslogtreecommitdiff
path: root/databases/passwords/postgres/passwords.sql
blob: cb81cd61adea9a2345afbbf58220be884231c072 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
-- References:
--           : https://www.postgresql.org/docs/current/view-pg-shadow.html
--           : https://www.postgresql.org/docs/current/auth-password.html
--           : https://www.postgresql.org/docs/current/auth-password.html#AUTH-PASSWORD-ENCRYPTION
--           : https://www.postgresql.org/docs/current/runtime-config.html

-- Defined password configuration
SELECT *
FROM pg_settings
WHERE name LIKE 'password_%';

-- Users and their password configurations
SELECT 
    usename AS user_name,
    passwd AS password,
    valuntil AS valid_until,
    useconfig AS user_config
FROM pg_shadow;