tag:blogger.com,1999:blog-1304632214644526142.post2245431319054849136..comments2023-05-12T12:29:59.923+08:00Comments on Scratching My Needs: PostgreSQL - How to reset user name "postgres" passwordPsyberMonkeyhttp://www.blogger.com/profile/00048858509837732571noreply@blogger.comBlogger10125tag:blogger.com,1999:blog-1304632214644526142.post-26552218313335112372016-03-08T13:33:56.734+08:002016-03-08T13:33:56.734+08:00I tried like su - postgres but password is not mat...I tried like su - postgres but password is not matched.<br />Unfortunately i forgot my password..<br />Now i need to recover that..<br />Pls help me.....Anonymoushttps://www.blogger.com/profile/15033602666348226486noreply@blogger.comtag:blogger.com,1999:blog-1304632214644526142.post-16487815518321068922015-10-20T18:31:34.712+08:002015-10-20T18:31:34.712+08:00[x] pg_hba.conf (from data folder)
host all postgr...[x] pg_hba.conf (from data folder)<br />host all postgres 127.0.0.1/32 trust<br />#host all all 127.0.0.1/32 md5<br /><br />[x]cmd prompt<br />psql -U postgres -h 127.0.0.1<br /><br />ALTER USER postgres with password 'admin';<br /><br />Note:dont forget ";" to alter passwordsp3dhttps://www.blogger.com/profile/07649018845630013811noreply@blogger.comtag:blogger.com,1999:blog-1304632214644526142.post-43745540925290395102015-10-16T02:27:35.318+08:002015-10-16T02:27:35.318+08:00Thanks this post was still helpful in postgres 9.4...Thanks this post was still helpful in postgres 9.4. Just you dont have to use "sameuser".Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1304632214644526142.post-83969859468224862782013-09-18T01:02:08.704+08:002013-09-18T01:02:08.704+08:00Thanks for the info.
Note that with Postgresql 9.2...Thanks for the info.<br />Note that with Postgresql 9.2 "trust sameuser" is not accepted anymore, instead use only "trust".Unknownhttps://www.blogger.com/profile/16893608056944196435noreply@blogger.comtag:blogger.com,1999:blog-1304632214644526142.post-3291154098996310432013-08-01T03:39:30.157+08:002013-08-01T03:39:30.157+08:00It doesn't work with
local all post...It doesn't work with<br /><br />local all postgres trust sameuser<br /><br />But it worked with<br /><br />local all postgres trust<br /><br />Thanks for the tipNegrabarbahttps://www.blogger.com/profile/14595419732724764943noreply@blogger.comtag:blogger.com,1999:blog-1304632214644526142.post-34715815988538807922013-05-14T03:37:38.892+08:002013-05-14T03:37:38.892+08:00I also have 9.1. It worked after I replaced '...I also have 9.1. It worked after I replaced 'md5 sameuser' with 'peer'Anonymoushttps://www.blogger.com/profile/13414731548398385921noreply@blogger.comtag:blogger.com,1999:blog-1304632214644526142.post-41323767360567398792013-05-14T03:36:30.857+08:002013-05-14T03:36:30.857+08:00I have 9.1, and I tried replacing 'md5 sameuse...I have 9.1, and I tried replacing 'md5 sameuser' with 'peer' and it worked.<br />Anonymoushttps://www.blogger.com/profile/13414731548398385921noreply@blogger.comtag:blogger.com,1999:blog-1304632214644526142.post-1533431038958101302013-04-22T21:02:32.574+08:002013-04-22T21:02:32.574+08:00It does not work for me.... if I modify the line, ...It does not work for me.... if I modify the line, server does not start. If I remove "sameuser" part, server start but when using psql -U postgres, password is requested.<br /><br />I have postgreSQL 9.1<br /><br />Regards,<br />JaimeAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1304632214644526142.post-65582015589339288852009-06-21T17:21:28.000+08:002009-06-21T17:21:28.000+08:00In Steps 2 and 7, for the pg_hba.conf to take effe...In Steps 2 and 7, for the pg_hba.conf to take effect, you can just use the comman 'reload'. Instead of restarting the Postgres server, it just signals the server to re-read the config files.Gurjeet Singhnoreply@blogger.comtag:blogger.com,1999:blog-1304632214644526142.post-84955838484254848772009-06-21T09:50:20.000+08:002009-06-21T09:50:20.000+08:00so late still post ar. so hardworking la. heheso late still post ar. so hardworking la. heheSoGuahttp://www.techiecorner.comnoreply@blogger.com