Re: Health warning:
Zahid Rahman <[email protected]> Tue, 17 Dec 2019 21:39:13 +0000
| Newsgroups | gmane.comp.db.postgresql.novice |
|---|---|
| Message-ID | <CAPGSW3THojtnEYy3jPbsS0CsFy=81K5=wHekjqMWMr1YijHNGg@mail.gmail.com> |
--0000000000000548d20599ed29b8 Content-Type: text/plain; charset="UTF-8" You have to set to trust from peer the first time you download and install postgres. Because there is no default password. After you create a password. Then you can reset from trust. You also have to reboot your computer each time you change etc/postgresql/12/main/pg_hba.conf. at the very least restart the database. With the big O you get a default username: Scott. Password: tiger Many people forget to reset the default password on the big O. user Scott has admin privileges. On Tue, 17 Dec 2019, 21:24 Stephen Frost, <[email protected]> wrote: > Greetings, > > * Zahid Rahman ([email protected]) wrote: > > I know a database whose name begins with O that does this. > > That doesn't make it a good idea. > > > the user types: > > *psql -U postgres * > > > > response: > > *PROBLEM: psql: error: could not connect to server: FATAL: Peer > > authentication failed for user "postgres"* > > This indicates that the user you're connecting as doesn't have > permission to log into the database as the 'postgres' user. > > > *SOLUTION: change "local all all peer" in file > > /etc/postgresql/12/main/pg_hba.conf * > > *to "local all all trust".create password then change back.* > > Using "trust" there actually means that you're able to log into the > database as any user and is terribly insecure. > > Thanks, > > Stephen > --0000000000000548d20599ed29b8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto">You have to set to trust from peer the=C2=A0first time yo= u download and install postgres.<div dir=3D"auto"><div dir=3D"auto">Because= there is no default password.<br></div><div dir=3D"auto"><div dir=3D"auto"= style=3D"font-family:sans-serif">After you create a password.</div><div di= r=3D"auto" style=3D"font-family:sans-serif">Then you can reset from trust.<= /div><div dir=3D"auto" style=3D"font-family:sans-serif"><br></div></div><di= v dir=3D"auto">You also have to reboot=C2=A0your computer each time you cha= nge=C2=A0<span style=3D"font-family:sans-serif;font-size:12.8px">etc/postgr= esql/12/main/pg_hba</span><span style=3D"font-family:sans-serif;font-size:1= 2.8px">.conf.</span></div><div dir=3D"auto">at the very least restart the d= atabase.<br></div><div dir=3D"auto"><br></div><div dir=3D"auto"><br></div><= div dir=3D"auto">With the big O you get a default=C2=A0 username: Scott.</d= iv><div dir=3D"auto">Password:=C2=A0 tiger</div><div dir=3D"auto"><br></div= ><div dir=3D"auto">Many people forget to reset the default password on the = big O. user Scott has admin privileges.</div><div dir=3D"auto"><br></div></= div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_at= tr">On Tue, 17 Dec 2019, 21:24 Stephen Frost, <<a href=3D"mailto:sfrost@= snowman.net" target=3D"_blank" rel=3D"noreferrer">[email protected]</a>>= ; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .= 8ex;border-left:1px #ccc solid;padding-left:1ex">Greetings,<br> <br> * Zahid Rahman (<a href=3D"mailto:[email protected]" rel=3D"noreferrer n= oreferrer" target=3D"_blank">[email protected]</a>) wrote:<br> > I know a database whose name begins with O that does this.<br> <br> That doesn't make it a good idea.<br> <br> > the user types:<br> > *psql=C2=A0 -U postgres *<br> > <br> > response:<br> > *PROBLEM: psql: error: could not connect to server: FATAL:=C2=A0 Peer<= br> > authentication failed for user "postgres"*<br> <br> This indicates that the user you're connecting as doesn't have<br> permission to log into the database as the 'postgres' user.<br> <br> > *SOLUTION: change "local=C2=A0 all all=C2=A0 peer" in file<b= r> > /etc/postgresql/12/main/pg_hba.conf *<br> > *to "local=C2=A0 all all=C2=A0 trust".create password then c= hange=C2=A0 back.*<br> <br> Using "trust" there actually means that you're able to log in= to the<br> database as any user and is terribly insecure.<br> <br> Thanks,<br> <br> Stephen<br> </blockquote></div> --0000000000000548d20599ed29b8--