Re: non-superuser login phpPgAdmin PostgreSQL 9.1 - Mailing list pgsql-admin

From Albe Laurenz
Subject Re: non-superuser login phpPgAdmin PostgreSQL 9.1
Date
Msg-id D960CB61B694CF459DCFB4B0128514C2086C137A@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Re: non-superuser login phpPgAdmin PostgreSQL 9.1  (johnkn63 <john.knightley@gmail.com>)
Responses Re: non-superuser login phpPgAdmin PostgreSQL 9.1  (johnkn63 <john.knightley@gmail.com>)
List pgsql-admin
johnkn63 wrote:
>> That's if you started the server with -b.

> now how  do I find out how server is starting and how do I change it?
I am
> running 9.1 on debian

Look at the output of "pg_ctl status".
What do you see there?

Actually, the error message would be different in this case, so
I don't think that that's your problem.

>> Can you connect with
>> "psql -h 127.0.0.1 -U nonsuperuser -d database" ?
>
> no,
>
>    psql -h 127.0.0.1 -U nonsuperuser -d database
>
> does not work
>
> though of course,
>    psql -h 127.0.0.1 -U superuser -d database
> works

This sounds mysterious.

Could you try the following with psql (as superuser):

psql -U postgres -d postgres
postgres=# CREATE ROLE testuser LOGIN PASSWORD 'testpwd';
postgres=# GRANT CONNECT ON DATABASE postgres TO testuser;
postgres=# \q

Then try to connect with

psql -h 127.0.0.1 -U testuser -d postgres -W
and enter the password.

That should not work according to your report.

Now login again as superuser and try:

psql -U postgres -d postgres
postgres=# ALTER USER testuser SUPERUSER;
postgres=# \q

Then see if you can connect as "testuser" as above.

Yours,
Laurenz Albe


pgsql-admin by date:

Previous
From: johnkn63
Date:
Subject: Re: non-superuser login phpPgAdmin PostgreSQL 9.1
Next
From: "Kevin Grittner"
Date:
Subject: Re: pg_restore problem "Found unexpected Block id"