Обсуждение: Problems connecting from pgAdmin II v1.1 build 59

Поиск
Список
Период
Сортировка

Problems connecting from pgAdmin II v1.1 build 59

От
Jason Wong
Дата:
SITUATION
=========
postgresql server was running fine on a linux server. I decided to
install pgAdmin on a Win98 to ease development.

WHAT I DID
==========
Installed pgAdmin, no problem.
On the server side I edited the postgresql.conf file to enable TCP/IP
connections.
I added a line to pg_hba.conf:

  host   all  10.0.0.0 255.255.255.0   password password.file

I then used pg_passwd to create the "password.file" file (in the same
directory as pg_hba.conf ie. /usr/local/pgsql/data), with a single user
& password.

I then restarted postmaster.

RESULT
======
When I try to connect to the server from pgAdmin I get this error:

  [FATAL 1: user "blahblah" does not exist]

I have double-checked the file "password.file" and the user does have
an entry along with a crypted password.

For the heck of it I tried to connect using a random user in the
pgAdmin "Connect to Server" dialog and got this error:

  [Password authentication failed for user 'dimwit']

On the console of the server the error was:

  [verify_password: user 'dimwit' not found in password file.]
  [Password authentication failed for user 'dimwit']

Next I edited pg_hba.conf to read instead:

  host   all  10.0.0.0 255.255.255.0   crypt password.file

And restarted postmaster.

Connecting results in this error:

  [Password crypt authentication not supported]


I would be grateful if someone could point out what I am doing wrong.

thanks
--
Jason Wong

Re: Problems connecting from pgAdmin II v1.1 build 59

От
"Josh Berkus"
Дата:
Jason,

Thanks for posting such a clear description of your problem.  It makes
it much easier to provide advice.

In the future, you may wish to join the PGSQL-ODBC list for this and
similar problems relating to PgAdmin (there is a PGAdmin list, but last
I checked it was dead).

> RESULT
> ======
> When I try to connect to the server from pgAdmin I get this error:
>
>   [FATAL 1: user "blahblah" does not exist]

Simple.  You've added the user to the password.file, but not to the
database.  The error above is because the initial authentication
succeeded, but that user has not been created in the database you are
trying to connect to.

Other things to watch out for: 1) I don't believe that PgAdmin supports
crypted passwords at this time.  You'll have to use cleartext.  2) I've
never been clear on the utility of the password.file, except as a way to
further restrict who cna use a particular interface.

-Josh

______AGLIO DATABASE SOLUTIONS___________________________
                                       Josh Berkus
  Complete information technology      josh@agliodbs.com
   and data management solutions       (415) 565-7293
  for law firms, small businesses        fax 621-2533
    and non-profit organizations.      San Francisco

Вложения

Re: Problems connecting from pgAdmin II v1.1 build 59

От
Jason Wong
Дата:
Josh

> Thanks for posting such a clear description of your problem.  It
> makes it much easier to provide advice.

I try my best :-)

> In the future, you may wish to join the PGSQL-ODBC list for this and
> similar problems relating to PgAdmin (there is a PGAdmin list, but
> last I checked it was dead).

Thanks, I'll check it out.

> Simple.  You've added the user to the password.file, but not to the
> database.  The error above is because the initial authentication
> succeeded, but that user has not been created in the database you are
> trying to connect to.

Yes, that was it. I've added the user and now I'm able to connect. The
docs (Admin Guide section 4.2) does seem rather vague on the need to
*have* a user created in pg_shadow. I was under the impression it was
optional if I had a password file.

> Other things to watch out for: 1) I don't believe that PgAdmin
> supports crypted passwords at this time.  You'll have to use
> cleartext.

I think you're right. The message about not being able to use crypted
passwords seemed to have come from pgAdmin itself and not the server.

thanks
--
Jason Wong
Gremlins Associates
www.gremlins.com.hk