Is there a possibility to know the user password in Postgres?

Good day.
Inherited a server with lots of databases, and have only the password of OS user postgres.
And is there any possibility to know the user password in Postgres?
Not to dump but to learn.
I know that you can just create another one with full privileges, but there is just curiosity plays:)
March 23rd 20 at 19:18
1 answer
March 23rd 20 at 19:20
Solution
Passwords are most likely stored as md5. Method scram-sha-256 appeared only in 10 and 12 including the release is still not used by default (problems with the database no, the community gives time for the implementation of this Protocol in the client libraries to 8.0 with mysql as it turned out).

The password hashes md5 can be found in table pg_authid system catalog are considered as
select rolpassword = ('md5' || md5('some password' || rolname)) from pg_authid where rolname = 'username';

That is, to restore the original password is impossible. You can try to find a collision for the hash.

Find more questions by tags CentOSPostgreSQL