mirror of
https://github.com/swisskyrepo/PayloadsAllTheThings.git
synced 2025-01-06 01:58:46 +00:00
Add PostgreSQL Check if Current User is Supperuser
This commit is contained in:
parent
daebeeadd2
commit
4b8dab523e
1 changed files with 9 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
||||||
* [PostgreSQL List Password Hashes](#postgresql-list-password-hashes)
|
* [PostgreSQL List Password Hashes](#postgresql-list-password-hashes)
|
||||||
* [PostgreSQL List Database Administrator Accounts](#postgresql-list-database-administrator-accounts)
|
* [PostgreSQL List Database Administrator Accounts](#postgresql-list-database-administrator-accounts)
|
||||||
* [PostgreSQL List Privileges](#postgresql-list-privileges)
|
* [PostgreSQL List Privileges](#postgresql-list-privileges)
|
||||||
|
* [PostgreSQL Check if Current User is Supperuser](#postgresql-check-if-current-user-is-supperuser)
|
||||||
* [PostgreSQL database name](#postgresql-database-name)
|
* [PostgreSQL database name](#postgresql-database-name)
|
||||||
* [PostgreSQL List databases](#postgresql-list-database)
|
* [PostgreSQL List databases](#postgresql-list-database)
|
||||||
* [PostgreSQL List tables](#postgresql-list-tables)
|
* [PostgreSQL List tables](#postgresql-list-tables)
|
||||||
|
@ -70,6 +71,14 @@ SELECT usename FROM pg_user WHERE usesuper IS TRUE
|
||||||
SELECT usename, usecreatedb, usesuper, usecatupd FROM pg_user
|
SELECT usename, usecreatedb, usesuper, usecatupd FROM pg_user
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## PostgreSQL Check if Current User is Supperuser
|
||||||
|
|
||||||
|
```sql
|
||||||
|
SHOW is_superuser;
|
||||||
|
SELECT current_setting('is_superuser');
|
||||||
|
SELECT usesuper FROM pg_user WHERE usename = CURRENT_USER;
|
||||||
|
```
|
||||||
|
|
||||||
## PostgreSQL Database Name
|
## PostgreSQL Database Name
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
|
|
Loading…
Reference in a new issue