Thread: Fatal error: role "postgres" no login!

Fatal error: role "postgres" no login!

From
Salvator*eL*arosa
Date:
Hi at all......
I have a big problem.......://///

I don't able to log in in my database by pgAdmin3
It get me error:

ERROR CONNECTING TO THE SERVER:
FATAL: role"postgres" is not permitted to log in

Can someone help me?

Thanks and sorry my english!
-- 
View this message in context:
http://www.nabble.com/Fatal-error%3A-role-%22postgres%22-no-login%21-tp14537100p14537100.html
Sent from the PostgreSQL - pgadmin support mailing list archive at Nabble.com.



Re: Fatal error: role "postgres" no login!

From
Raymond O'Donnell
Date:
On 29/12/2007 12:24, Salvator*eL*arosa wrote:
> ERROR CONNECTING TO THE SERVER:
> FATAL: role"postgres" is not permitted to log in

Have you a line in your server's pg_hba.conf file allowing remote 
connections by the role "postgres"? Something like:
    host   all   postgres     192.168.1.25/24      md5

The configuration is well documented in the file itself, and also in the 
PostgreSQL docs under "Client Authentication" (if memory serves).

HTH

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------


Re: Fatal error: role "postgres" no login!

From
Salvator*eL*arosa
Date:


Raymond O'Donnell wrote:
> 
> On 29/12/2007 12:24, Salvator*eL*arosa wrote:
>> ERROR CONNECTING TO THE SERVER:
>> FATAL: role"postgres" is not permitted to log in
> 
> Have you a line in your server's pg_hba.conf file allowing remote 
> connections by the role "postgres"? Something like:
> 
>      host   all   postgres     192.168.1.25/24      md5
> 
> The configuration is well documented in the file itself, and also in the 
> PostgreSQL docs under "Client Authentication" (if memory serves).
> 
> HTH
> 
> 

My pg_hba.conf is:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               trust
# IPv4 local connections:
host    all         all         127.0.0.1/32          trust
# IPv6 local connections:
host    all         all         ::1/128               trust
    
 
the same error get me it......

-- 
View this message in context:
http://www.nabble.com/Fatal-error%3A-role-%22postgres%22-no-login%21-tp14537100p14538577.html
Sent from the PostgreSQL - pgadmin support mailing list archive at Nabble.com.



Re: Fatal error: role "postgres" no login!

From
Raymond O'Donnell
Date:
On 29/12/2007 15:37, Salvator*eL*arosa wrote:

> My pg_hba.conf is:
> 
> # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
> 
> # "local" is for Unix domain socket connections only
> local   all         all                               trust
> # IPv4 local connections:
> host    all         all         127.0.0.1/32          trust
> # IPv6 local connections:
> host    all         all         ::1/128               trust

There's your problem - if you're trying to connect to the database from 
a different machine, then you need to add another "host" line to allow it.

What you have here looks like the default pg_hba.conf that's created on 
installation - you haven't edited it at all, and so it's only allowing 
connections from the machine on which Postgres is running.

If you want to allow user "postgres" to connect to all databases from, 
say, 192.168.1.25 with a netmask of 255.255.255.0, you need to add:
  host    all    postgres    192.168.1.25/24    md5

PgAdmin (or any other client) should then prompt for the password for 
user "postgres", and the password will be md5-encrypted before being 
passed over the wire.

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------


Re: Fatal error: role "postgres" no login!

From
Salvator*eL*arosa
Date:


Raymond O'Donnell wrote:
> 
> 
> There's your problem - if you're trying to connect to the database from 
> a different machine, then you need to add another "host" line to allow it.
> 
> What you have here looks like the default pg_hba.conf that's created on 
> installation - you haven't edited it at all, and so it's only allowing 
> connections from the machine on which Postgres is running.
> 
> If you want to allow user "postgres" to connect to all databases from, 
> say, 192.168.1.25 with a netmask of 255.255.255.0, you need to add:
> 
>    host    all    postgres    192.168.1.25/24    md5
> 
> PgAdmin (or any other client) should then prompt for the password for 
> user "postgres", and the password will be md5-encrypted before being 
> passed over the wire.
> 
> Ray.
> 
> 
> 

Thank you for reply, but I have not resolved, again......

That error gives me, because I modify ROLE of postgres user in NOT LOG
IN........

How can i to restore my settings?


-- 
View this message in context:
http://www.nabble.com/Fatal-error%3A-role-%22postgres%22-no-login%21-tp14537100p14539729.html
Sent from the PostgreSQL - pgadmin support mailing list archive at Nabble.com.



Re: Fatal error: role "postgres" no login!

From
Raymond O'Donnell
Date:
On 29/12/2007 17:48, Salvator*eL*arosa wrote:

> That error gives me, because I modify ROLE of postgres user in NOT LOG
> IN........

I'm not sure that I understand you....do you mean that you removed the 
CONNECT permission from the postgres user to the database to which you 
want to connect?

Can you describe *exactly* the steps you take, and the error messages 
you get back?

Ray.

---------------------------------------------------------------
Raymond O'Donnell, Director of Music, Galway Cathedral, Ireland
rod@iol.ie
---------------------------------------------------------------


Re: Fatal error: role "postgres" no login!

From
Salvator*eL*arosa
Date:


Raymond O'Donnell wrote:
> 
> 
> I'm not sure that I understand you....do you mean that you removed the 
> CONNECT permission from the postgres user to the database to which you 
> want to connect?
> 
> Can you describe *exactly* the steps you take, and the error messages 
> you get back?
> 
> Ray.
> 
> 
> 

In pgAdminIII in my connection server (localhost), i have modified
the ROLE of superuser (postgres) from LOGIN to NOT LOGIN...that's all!!
So, when i want connect (localhost) it get back me error:
ERROR CONNECTING TO THE SERVER:
FATAL: role..................................
...............

is there a way for restored it?
can i to reset my data directory to resolv my
problem???(/usr/local/pgsql/data)

Thank you very much and sorry sorry my english!
-- 
View this message in context:
http://www.nabble.com/Fatal-error%3A-role-%22postgres%22-no-login%21-tp14537100p14541715.html
Sent from the PostgreSQL - pgadmin support mailing list archive at Nabble.com.