Set password to original one without knowing
--- Lets say you forgot the password of the user and u want to set the same password to that user in same or different db
postgresql configurationintermediate
by PostgreSQL
15 views
--- Lets say you forgot the password of the user and u want to set the same password to that user in same or different db
123456789101112131415161718
--- Lets say you forgot the password of the user and u want to set the same password to that user in same or different db
postgres=#
alter user dbaprod password 'new';
ALTER ROLE
postgres=#
SELECT rolname, rolpassword FROM pg_catalog.pg_authid where rolname='dbaprod';
rolname | rolpassword
---------+-------------------------------------
dbaprod | md5041382740aeba232404af81454f48d7f ( it has been changed)
postgres=#
update pg_catalog.pg_authid set rolpassword = 'md5bbb103edd695a83d45db75755e459a78' where rolname='dbaprod';
UPDATE 1
postgres$
PGPASSWORD=old
./psql -d postgres -U dbaprod
Password:
psql (12.3)
Type "help" for help.Please to add comments
No comments yet. Be the first to comment!