Retrieve postgres password

From: "ray madigans(dot)org" <ray(at)madigans(dot)org>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Retrieve postgres password
Date: 2015-09-02 23:43:24
Message-ID: 1181547181.26300.1441237404104.JavaMail.vpopmail@atl4oxapp105.mgt.hosting.qts.netsol.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head><body><p>I have lost/forgotten the postgres password for my installation so&#160;I did the following.</p><p>I edited pg_hba.conf and added&#160;an entry:</p><p> local all all trust</p><p>restarted postgresql. </p><p>loged in as postgres (psql template1 -U postgres) </p><p>change the postgres password&#160;with</p><p>ALTER&#160;ROLE postgres PASSWORD foo</p><p>I edited pg_hba.conf and get rid of the added&#160;line</p><p>restarted postgres</p><p>when I attempted to reenter with&#160;</p><p> psql template1 -U postgres --password<br></p><p>I get an error Peer authentication failed for user &#34;postgres&#34;</p><p><br></p><p>Not sure what I did wrong, any help would be appreciated.&#160;</p></body></html>

Attachment Content-Type Size
unknown_filename text/html 956 bytes

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Melvin Davidson 2015-09-02 23:47:37 Re: get first and last row in one sql as two columns
Previous Message Rob Sargent 2015-09-02 23:30:13 Re: get first and last row in one sql as two columns