Re: Resetting the pgadmin4 web user credentials

From: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
To: Kevin Struckhoff <kevinstruckhoff(at)yahoo(dot)com>
Cc: richard coleman <rcoleman(dot)ascentgl(at)gmail(dot)com>, "pgadmin-support(at)lists(dot)postgresql(dot)org" <pgadmin-support(at)lists(dot)postgresql(dot)org>
Subject: Re: Resetting the pgadmin4 web user credentials
Date: 2021-07-28 05:41:25
Message-ID: CAM9w-_kfdzg2RTd83A6hCSJr483VEVJygW49ZKmvK9JmHVcrgQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi Kevin,

On Wed, Jul 28, 2021 at 5:05 AM Kevin Struckhoff <kevinstruckhoff(at)yahoo(dot)com>
wrote:

> Ok some additional background. I'm attempting to run pgadmin4 web from a
> CentOS VM hosted on my win 10 laptop. That VM also runs postgres13, so both
> app on 1 server. I have pgadmin4 desktop also running on my laptop just
> fine and I use the user postgres to login. The 1st pg_hba.conf makes that
> happen. So it should work for ALL users on ALL db's on that same IP
> address. Why doesn't it then?
>
> I tried to add a user in the web console, but it won't allow me to set a
> username, just an email address, password and whether I want an admin or
> user. Why is the web version requiring an email address? I couldn't care
> less about an email address, I just want to login the same way I do the
> desktop. There's no reason the web user shouldn't be the same as the
> desktop user, at least that's what my inner-Spock tells me. I'm only
> confused by the lack of similarity in the login process. Very frustrating.
>
pgAdmin users are altogether different from postgres users. postgres
credentials are used to connect the servers. The purpose of email id is to
reset password in case a user forgets. While installing pgAdmin in server
mode, admin user creation credentials are asked from the user. You can use
them to login to pgAdmin. For more details, please refer -
https://www.pgadmin.org/docs/pgadmin4/5.5/server_deployment.html

>
>
> Thanks. Kevin
>
>
> On Tuesday, July 27, 2021, 4:04:01 PM PDT, richard coleman <
> rcoleman(dot)ascentgl(at)gmail(dot)com> wrote:
>
>
> Kevin,
> I don't think that the pgAdmin user and the database user are necessarily
> the same thing (though I could be wrong) [see:
> https://www.pgadmin.org/docs/pgadmin4/5.4/user_management.html ]. The
> pg_hba.conf file defines what users/machines/methods are allowed to connect
> to a postgresql server. So for the first line in your example:
>
> host all all my.dbserver.ip.addr/32 trust
>
> this would mean; *host * == connections made over TCP/IP, the first *all* ==
> which databases, the second *all* == which users, the
> *my.dbserver.ip.addr/32* == means *only* allow connections originating
> from that *exact* ip address, and *trust* == allow connections without a
> password or any other form of authentication [see:
> https://www.postgresql.org/docs/13/auth-pg-hba-conf.html ]. I am
> guessing that you have gotten the pgAdmin users confused with the
> postgresql database users.
>
> I would imagine that the pgAdmin server would need an entry in the
> pg_hba.conf file for whatever machine pgAdmin is running on and I would be
> amazed if it was using *trust* (or *no* authentication) to connect with.
> I use pgAdmin exclusively in desktop mode, so hopefully someone else who's
> more familiar with server mode will chime in.
>
> I hope that helps,
>
> rik.
>
>
>
>
> On Tue, Jul 27, 2021 at 6:28 PM Kevin Struckhoff <
> kevinstruckhoff(at)yahoo(dot)com> wrote:
>
> Sorry re-posting with a corrected subject.
>
> Thanks. Kevin
>
>
> On Tuesday, July 27, 2021, 3:20:39 PM PDT, Kevin Struckhoff <
> kevinstruckhoff(at)yahoo(dot)com> wrote:
>
>
> After getting pgadmin4 installed and configured, I've found out that the
> user credentials I specified during the setup don't work very well. I've
> added the user to the postgres db using the adduser command. I updated the
> pg_hba.conf file with an entry just for the user but I get this error when
> trying to connect for the 1st time:
>
> FATAL: no pg_hba.conf entry for host " my.dbserver.ip.addr", user "p(at)p(dot)com",
> database "postgres", SSL off
>
> psql postgres
> postgres-# adduser p(at)p(dot)com
> postgres-#\q
>
> pg_hba.conf entries (actual ip number hidden):
>
> host all all my.dbserver.ip.addr/32 trust
> host all p(at)p(dot)com my.dbserver.ip.addr /32 trust
> # for pgadmin4 web
>
> So I would have thought the 1st entry would cover all users. I can't
> create a linux user because the user name is invalid:
>
> useradd: invalid user name 'p(at)p(dot)com'
>
> So to make it work, I'd just like to set the username/password to the
> postgres user. Where can I do that? I don't see a .py or .conf file other
> than pg_hba.conf where the user is defined.
>
> Thanks. Kevin
>
>

--
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
<http://edbpostgres.com>
"Don't Complain about Heat, Plant a TREE"

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Kevin Struckhoff 2021-07-28 20:27:34 Re: Resetting the pgadmin4 web user credentials
Previous Message Kevin Struckhoff 2021-07-28 00:05:12 Fw: Resetting the pgadmin4 web user credentials