Re: non-superuser login phpPgAdmin PostgreSQL 9.1

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "johnkn63 *EXTERN*" <john(dot)knightley(at)gmail(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: non-superuser login phpPgAdmin PostgreSQL 9.1
Date: 2012-09-13 14:11:11
Message-ID: D960CB61B694CF459DCFB4B0128514C2086C137A@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2012-09-13 14:13:58 Re: pg_restore problem "Found unexpected Block id"
Previous Message johnkn63 2012-09-13 13:31:56 Re: non-superuser login phpPgAdmin PostgreSQL 9.1