Re: password authentication failed for user postgres - Mailing list pgsql-admin

From Iñigo Martinez Lasala
Subject Re: password authentication failed for user postgres
Date
Msg-id 1267691098.17535.243.camel@deimos
Whole thread Raw
In response to Re: password authentication failed for user postgres  (Major Services <services.major@gmail.com>)
Responses Re: password authentication failed for user postgres
List pgsql-admin
dbadmin is a database user, not a Linux user.
You cannot use dbadmin in order to get logged to your machine. Only to access database.

Why are you using dbadmin to login to unix? Use root.

Configure your web app using your root user to login to postgresql with dbadmin. You will have to modify a config file somewhere in the path of this app. Read INSTALL or README files of your web app.

Use phppgadmin as alternative. It's also free and it will be probably at RedHat/CentOS repos. "yum install phppgadmin" or "up2date install phppgadmin"
Or webmin if you want to admin all server without having to use command line. http://www.webmin.com/




-----Original Message-----
From: Major Services <services.major@gmail.com>
To: Iñigo Martinez Lasala <imartinez@vectorsf.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] password authentication failed for user postgres
Date: Wed, 3 Mar 2010 23:40:39 +0530

When I try to login as dbadmin through shell, I get 'access denied'.

What could be wrong?

On Wed, Mar 3, 2010 at 10:49 PM, Iñigo Martinez Lasala
<imartinez@vectorsf.com> wrote:
> OK, it's a web app installed locally...
>
> Modify config file for this app (I don't know about it, so you will have to
> search by yourserlf) and point to 127.0.0.1 instead of use unix sockets, and
> also change use postgres for user dbadmin.
>
> Or modify your pg_hba.conf like this
> local     all     postgres     trust
>
> I don't suggest to revert to "local all postgres password" since you will
> have to enter password for any local operation in your server, but anyway,
> it's your decision.
>
> -----Original Message-----
> From: Major Services <services.major@gmail.com>
> To: Iñigo Martinez Lasala <imartinez@vectorsf.com>
> Cc: pgsql-admin@postgresql.org
> Subject: Re: [ADMIN] password authentication failed for user postgres
> Date: Wed, 3 Mar 2010 22:41:47 +0530
>
> Thanks.
> I already have created a user.
> And can connect to the server through the PgAdmin on my local system.
>
> My query now is :
> Now when I try to connect to the server through DBWebAdmin (in
>  Parallels Plesk Panel); I get the following :
>  Error: FATAL: Ident authentication failed for user "postgres"
>
>  (earlier, with this link I could reach the login screen for PgAdmin )
>
>   Do I need to remove the following from pg_hba.conf now?
>   local   all         postgres                          ident sameuser
>
> Thanks for all your help & support.
>
>
>
> On Wed, Mar 3, 2010 at 8:56 PM, Iñigo Martinez Lasala
> <imartinez@vectorsf.com> wrote:
>> Great. You managed to start server. :-)
>>
>> You are using user postgres and you shoudn't use it.I suggest you to
>> create
>> your own dbadmin...
>>
>> In your linux box, as root user:
>>
>> su - postgres
>> createuser -s dbadmin -P
>>
>> You will create a new user called dbadmin. It will ask you for a password
>> for this user and some extra options. Response YES to all.
>>
>> Now you can connect remotely with this dbadmin user.
>>
>>
>>
>> -----Original Message-----
>> From: Major Services <services.major@gmail.com>
>> To: Iñigo Martinez Lasala <imartinez@vectorsf.com>
>> Cc: pgsql-admin@postgresql.org
>> Subject: Re: [ADMIN] password authentication failed for user postgres
>> Date: Wed, 3 Mar 2010 20:07:23 +0530
>>
>>
>> Finally, I am able to create a user.
>>
>> Now when I try to connect to the server through DBWebAdmin (in
>> Parallels Plesk Panel); I get the following :
>> Error: FATAL: Ident authentication failed for user "postgres"
>>
>> (earlier, with this link I could reach the login screen for PgAdmin )
>>
>>  Do I need to remove the following from pg_hba.conf now?
>>  local   all         postgres                          ident sameuser
>>
>>
>>
>>
>>
>> On Tue, Mar 2, 2010 at 2:44 PM, Iñigo Martinez Lasala
>> <imartinez@vectorsf.com> wrote:
>>> In order to lauch createuser you don't need to modify listen_address
>>> since
>>> you can use unix sockets. But anyway it's a requirement if you are goint
>>> to
>>> access remotely.
>>>
>>> Add this line in first place to your pg_hba.conf
>>> local   all         postgres                          ident sameuser
>>>
>>>
>>> Reload postgresql and launch createuser as postgres user.
>>>
>>>
>>> -----Original Message-----
>>> From: Major Services <services.major@gmail.com>
>>> To: pgsql-admin@postgresql.org
>>> Subject: [ADMIN] password authentication failed for user postgres
>>> Date: Tue, 2 Mar 2010 14:13:10 +0530
>>>
>>> Hi,
>>>
>>> 1. I have added  listen_addresses = '*' ; in  postgresql.conf
>>>
>>> 2. And have made the following changes to pg_hba.conf
>>>
>>> local   DATABASE    USER   METHOD
>>> local    samegroup      all      password
>>> host    DATABASE    USER    CIDR-ADDRESS  METHOD  [OPTION]
>>>
>>
>>> hostssl      all                 all       0.0.0.0/0            md5
>>>
>>> 3. Have restarted the server
>>>
>>> 4. I can login to the server as user postgres.
>>>
>>> But  while trying to createuser I get the following message  :
>>> 'createuser: could not connect to database postgres:  FATAL :
>>> password authentication failed for user "postgres"
>>>
>>> This is on Redhat running Plesk also.
>>>
>>> I am new to Linux as well as PostgreSQL. Help would be much appreciated.
>>>
>>> Thanks
>>> Viv
>>>
>>>
>>>
>>
>>
>
>

pgsql-admin by date:

Previous
From: Mikko Partio
Date:
Subject: Backup from a hot standby
Next
From: Major Services
Date:
Subject: Re: password authentication failed for user postgres