HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlModerate

Where are the username and password stored in postgresql?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
storedpostgresqlthearewhereusernamepasswordand

Problem

I'm using the PostgreSQL database. In it I create users. So I want to know

  • Where are the User name and Password stored?



  • Whether the Password is stored as plain text or encrypted data?



  • Whether root user is able to read the password or not?

Solution


  • In pg_authid



  • By default encrypted, see here



  • no, not possible (if encrypted)



In comments, you asked:

So may I know how you said not possible (if encrypted). If not encrypted also unable to view right

If it's not encrypted, it's stored in plain text and then the superuser can read the password (but who with a sane mind would store a password unencrypted). You can easily test that for yourself using create user foo unencrypted password 'bar';

Context

StackExchange Database Administrators Q#154938, answer score: 16

Revisions (0)

No revisions yet.