Prin utilizarea acestui site, sunteți de acord cu Politica de confidențialitate.
Accepta
EnterineEnterineEnterine
  • ACASĂ
  • Pro
  • Tehnologie
  • Microsoft
    • Azur
    • ConfigMgr/SCCM
    • Dpm
    • Orchestrator
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Birou 365
    • Office Insider
    • Putere bi
    • Skype
    • Server SQL
    • Echipe
  • Ferestre
    • Centrul de administrare Windows
    • Client Windows
    • Windows Server
  • Lista de colecție de interogări SCCM
Lectură: How to Create a Superuser ROLE in PostgreSQL
Redimensionare fontAa
EnterineEnterine
Redimensionare fontAa
  • ACASĂ
  • Pro
  • Tehnologie
  • Microsoft
  • Ferestre
  • Lista de colecție de interogări SCCM
Căutare
  • ACASĂ
  • Pro
  • Tehnologie
  • Microsoft
    • Azur
    • ConfigMgr/SCCM
    • Dpm
    • Orchestrator
    • Hyper-V
    • Microsoft Edge Insider
    • MSI
    • Birou 365
    • Office Insider
    • Putere bi
    • Skype
    • Server SQL
    • Echipe
  • Ferestre
    • Centrul de administrare Windows
    • Client Windows
    • Windows Server
  • Lista de colecție de interogări SCCM
PostgreSQL

How to Create a Superuser ROLE in PostgreSQL

Publicat: February 18, 2024
2 Min Citește
Cota

How to Create a Superuser ROLE in PostgreSQL.

PostgreSQL onwards uses the concept of ROLE instead of USER. A role can be a user or a group depending on your configuration. So we will create a ROLE with superuser privileges.

Log into PostgreSQL and run the following command to create a new role with superuser privileges. Replace test_role as per your requirement.

CREATE ROLE test_role LOGIN SUPERUSER;

A database role has all permissions, except the permission to login. So you need to grant it to the new role.

If you also want to assign a login password, modify the above command to the following. Replacetest_password with your choice of password.

CREATE ROLE rolename LOGIN SUPERUSER PASSWORD 'test_password';

You can also create a non-super user ROLE and then make it a superuser as shown below. Replacetest_role with your choice of role.

CREATE ROLE test_role LOGIN;
ALTER ROLE test_role WITH SUPERUSER;

Here is the command to change the superuser into a regular role.

ALTER ROLE test_role WITH NOSUPERUSER;

Here is the command to create a user with superuser privileges as per the PostgreSQL version lower than 8.1. Replacetest_user as your requirement.

CREATE USER test_user SUPERUSER;

If you want your superuser to have a login password, modify the above command as shown below.

CREATE USER username SUPERUSER WITH PASSWORD 'test_password';
Etichetat:dbPostgresql
Articolul precedent Office Insider 2108 for Windows
Articolul următor Disable weak SSH encryption algorithms
Lasă un comentariu Lasă un comentariu

Lasă un răspuns Anulează răspunsul

Adresa ta de e-mail nu va fi publicată. Câmpurile obligatorii sunt marcate *

Acest site folosește Akismet pentru a reduce spamul. Aflați cum sunt procesate datele comentariilor dvs.

Traducere

English中文(简体)DanskNederlandsFrançaisDeutschItaliano한국어PolskiPortuguêsRomânăEspañolУкраїнська
de Transposh - translation plugin for wordpress

Postări populare

Cerințe de sistem pentru Windows Server 2016
Windows Server
Lista de colecție de interogări din Configuration Manager
Lista de colecție de interogări din Configuration Manager
Configmgr
Navigarea structurată/gestionată este activată în paginile moderne din site-urile clasice ale echipelor
Teh
SCCM nu s-a obținut locațiile DP ca versiune așteptată de la MP
Configmgr

Postări recente

Instalarea și configurarea Fail2ban pentru protecție SSH pe Ubuntu 24.04
Linux
Activarea și configurarea FirewallD pe AlmaLinux
Linux
Crearea utilizatorilor și configurarea cheii SSH în AlmaLinux
Linux
Cum să resetați parola pe AlmaLinux
Linux

© 2023 Enterine

Accesați versiunea mobilă
Bine ai revenit!

Conectați-vă la contul dvs

Nume de utilizator sau adresă de e-mail
Parolă

Ți-ai pierdut parola?