Re: Health warning:
Zahid Rahman <[email protected]> Tue, 17 Dec 2019 23:47:25 +0000
| Newsgroups | gmane.comp.db.postgresql.novice |
|---|---|
| Message-ID | <CAPGSW3TkE5Q_PAUiwNrJyEWW5xqqjVDxNuGH3MOO1i8B27zYwA@mail.gmail.com> |
--000000000000e9cd990599eef396
Content-Type: text/plain; charset="UTF-8"
Software crisis averted. PGADMIN4 working.
First I followed these instructions to download and install software
https://www.postgresql.org/download/linux/ubuntu/
only up to postgresql-server-dev-12. no further.
Then I went to this website by googling sudo apt-get install pgadmin4
apache
https://www.tecmint.com/install-pgadmin-debian-10/ although I have ubuntu.
Don't forget to stop service apache server. sudo systemctl stop apache2
otherwise you will get a port clash with docker.
then I went to
https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html
copied and pasted the following code changing the email and password.
To the one I put in when prompted for and running command line sudo
apt-get install pgadmin4 apache.
downloaded docker with snap. sudo snap install docker
sudo docker pull dpage/pgadmin4
sudo docker run -p 80:80 \
-e '[email protected]' \
-e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \
-d dpage/pgadmin4
ran sudo docker
sudo docker run -p 80:80 -e '[email protected]'
-e 'PGADMIN_DEFAULT_PASSWORD=*******' -d dpage/pgadmin4
Here is the KICKER. (not http://127.0.0.1/pgadmin4)
go to browser and type http://127.0.0.1 and you will see the blue login
screen prompting you for the
above email and password.
Who is the MAN now ?
On Tue, 17 Dec 2019 at 22:28, Zahid Rahman <[email protected]> wrote:
> > I don't recommend doing so because it's very insecure.
> Sir, nothing is really secure.
> There is at least one person with full privileges.
>
>
>
> On Tue, 17 Dec 2019, 21:41 Stephen Frost, <[email protected]> wrote:
>
>> Greetings,
>>
>> * Zahid Rahman ([email protected]) wrote:
>> > 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.
>>
>> No- peer auth allows the "postgres" unix user, which is the user that
>> the database runs as, to connect.
>>
>> To do so, you would first "sudo su - postgres" and then run psql, and
>> then you'll be able to connect without any need for a password. This is
>> exactly what 'peer' auth is for and how it works and it's quite secure.
>>
>> There's no need to ever change the authentication method to be 'trust'
>> and I don't recommend doing so because it's very insecure.
>>
>> > 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.
>>
>> You don't have to restart the computer or the database when changes are
>> made to pg_hba.conf- you just need to issue a "reload".
>>
>> Thanks,
>>
>> Stephen
>>
>
--000000000000e9cd990599eef396
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Software crisis averted. PGADMIN4=C2=A0 working.<br><=
/div><div><br></div><div>First I followed these instructions to download an=
d=C2=A0 install software <br></div><div><a href=3D"https://www.postgresql.o=
rg/download/linux/ubuntu/">https://www.postgresql.org/download/linux/ubuntu=
/</a></div><div>only up to postgresql-server-dev-12. no further.<br></div><=
div><br></div><div>Then=C2=A0 I went to this website=C2=A0 by googling sudo=
apt-get install pgadmin4 apache</div><div><a href=3D"https://www.tecmint.c=
om/install-pgadmin-debian-10/">https://www.tecmint.com/install-pgadmin-debi=
an-10/</a> although I have ubuntu.</div><div><br></div><div>Don't forge=
t to stop service apache server. sudo systemctl stop apache2 otherwise you =
will get a port clash with docker.<br></div><div>then I went to <a href=3D"=
https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html">htt=
ps://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html</a></di=
v><div>copied and pasted the following code changing the email and password=
.</div><div>To the one I put in=C2=A0 when prompted for and running command=
line sudo apt-get install pgadmin4 apache.</div><div><div><pre>downloaded =
docker with snap. sudo snap install docker</pre></div><div> </div></div><d=
iv><pre>sudo docker pull dpage/pgadmin4
sudo docker run -p <span class=3D"gmail-m">80</span>:80 <span class=3D"gmai=
l-se">\</span>
-e <span class=3D"gmail-s1">'PGADMIN_DEFAULT_EMAIL=3D<a href=3D"mai=
lto:[email protected]">[email protected]</a>'</span> <span class=3D"gmail-s=
e">\</span>
-e <span class=3D"gmail-s1">'PGADMIN_DEFAULT_PASSWORD=3DSuperSecret=
'</span> <span class=3D"gmail-se">\</span>
-d dpage/pgadmin4<br></pre></div><div><div>ran=C2=A0 sudo docker <br></=
div><div>sudo docker run -p 80:80 =C2=A0 =C2=A0 -e 'PGADMIN_DEFAULT_EMA=
IL=3D<a href=3D"mailto:[email protected]">[email protected]</a>' =
=C2=A0 =C2=A0 -e 'PGADMIN_DEFAULT_PASSWORD=3D*******' =C2=A0 =C2=A0=
-d dpage/pgadmin4</div></div><div>Here is the KICKER. (not=C2=A0 <a href=
=3D"http://127.0.0.1/pgadmin4">http://127.0.0.1/pgadmin4</a>) </div><div>go=
to browser and type <a href=3D"http://127.0.0.1">http://127.0.0.1</a> and =
you will see the blue login screen prompting you for the</div><div>above em=
ail and password.</div><div><br></div><div>Who is the MAN=C2=A0 now ?<br></=
div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></=
div><div><br></div><div><br></div><div><br></div><div> <br></div><div><br><=
/div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><=
/div><div><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" c=
lass=3D"gmail_attr">On Tue, 17 Dec 2019 at 22:28, Zahid Rahman <<a href=
=3D"mailto:[email protected]">[email protected]</a>> wrote:<br></d=
iv><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bord=
er-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"auto"><div=
><span style=3D"font-family:sans-serif;font-size:12.8px">=C2=A0> I don&#=
39;t recommend doing so because it's very insecure.</span><div dir=3D"a=
uto"><span style=3D"font-family:sans-serif;font-size:12.8px">Sir, nothing i=
s really secure.</span></div><div dir=3D"auto"><span style=3D"font-family:s=
ans-serif;font-size:12.8px">There is at least one person with full privileg=
es.</span></div><div dir=3D"auto"><br></div><div dir=3D"auto"><br></div><di=
v dir=3D"auto"><br></div><div class=3D"gmail_quote"><div dir=3D"ltr" class=
=3D"gmail_attr">On Tue, 17 Dec 2019, 21:41 Stephen Frost, <<a href=3D"ma=
ilto:[email protected]" target=3D"_blank">[email protected]</a>> wrote=
:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.=
8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Greetings,<br>
<br>
* Zahid Rahman (<a href=3D"mailto:[email protected]" rel=3D"noreferrer" =
target=3D"_blank">[email protected]</a>) wrote:<br>
> You have to set to trust from peer the first time you download and ins=
tall<br>
> postgres.<br>
> Because there is no default password.<br>
> After you create a password.<br>
> Then you can reset from trust.<br>
<br>
No- peer auth allows the "postgres" unix user, which is the user =
that<br>
the database runs as, to connect.<br>
<br>
To do so, you would first "sudo su - postgres" and then run psql,=
and<br>
then you'll be able to connect without any need for a password.=C2=A0 T=
his is<br>
exactly what 'peer' auth is for and how it works and it's quite=
secure.<br>
<br>
There's no need to ever change the authentication method to be 'tru=
st'<br>
and I don't recommend doing so because it's very insecure.<br>
<br>
> You also have to reboot your computer each time you change<br>
> etc/postgresql/12/main/pg_hba.conf.<br>
> at the very least restart the database.<br>
<br>
You don't have to restart the computer or the database when changes are=
<br>
made to pg_hba.conf- you just need to issue a "reload".<br>
<br>
Thanks,<br>
<br>
Stephen<br>
</blockquote></div></div></div>
</blockquote></div>
--000000000000e9cd990599eef396--