On Wed, Apr 29, 2015 at 11:23 AM, bzb.dev001@gmail.com <bzb.dev001@gmail.co=
m
> wrote:
> On 2015-04-29 12:04 PM, David G. Johnston wrote:
>
>
> On Wed, Apr 29, 2015 at 8:09 AM, bzb.dev001@gmail.com <
> bzb.dev001@gmail.com> wrote:
> I have even changed the ownership of the file to postgres:postgres since
> I'm logged on as another user and .pgpass is located in this user's home
> directory. Yet it still does not work.
>>
>>
>> $ ls -l .pgpass
>> -rw------- 1 postgres postgres 79 Apr 29 10:24 .pgpass
>>
>
> =E2=80=8BSorry, I missed this the first time reading. This is your prob=
lem.
> The "postgres" Linux user and the "postgres" PostgreSQL user are not
> related to each other - particularly when using md5 authentication. The
> permissions on the .pgpass file must be of the user executing "psql" -
> which you've indicated is not "postgres".
>
> So, likely your first attempt failed because you had whitespace. You
> changed the permissions and now have two problems. You then fix the
> whitespace and are back to a single problem. Change the permissions back
> and it should now work.
>
> I've changed back the owner of .pgpass to the account that I've logged in
> as. This is the account that I'm using to run psql.
> All the spaces in .pgpass is removed.
> Checked that the permission settings of .pgpass is ok.
> restarted the server...
>
> $ sudo service postgresql restart
>
> Unfortunately, it is still not working.
>
> $ psql --host=3Dlocalhost --port=3D5432 --username=3Dpostgres --no-passw=
ord
> psql: fe_sendauth: no password supplied
>
> Incidentally, the postgresql server is running as 'postgres' user.
>
>
=E2=80=8BI am out of ideas. I am not currently running 9.4.x but if the pr=
oblem
was a bug within PostgreSQL there would be more than a single report.
David J.