Thread: problems with permissions

problems with permissions

From
Eric Smith
Date:
All,

Having a problem dumping a database using pg_dump. This is Mac OS 10.9.2 and postgres 8.3.  I'm using md5 for
authentication,and have the appropriate .pgpass file with u=rw permissions in the user's home directory.  I can access
mydatabase, called radiovision, using psql -U radiovision.  I think that means the authentication is working properly
(i.e.postgres does not ask for a password for radiovision or give me any authentication errors).  However, when I try
tocreate a backup using pg_dump -C radiovision, I am prompted for a password to which I respond with radiovision's
password. I then get the error: 

connection to database "radiovision" failed:  FATAL:  password authentication failed for user "DrRudner".


Why is postgres asking for a password for DrRudner?  This is the mac username of the user currently logged in, and also
theuser that installed postgres initially. 

Any help is much appreciated!!

Regards,
Eric



Re: problems with permissions

From
John R Pierce
Date:
On 4/25/2014 7:11 PM, Eric Smith wrote:
> Having a problem dumping a database using pg_dump. This is Mac OS 10.9.2 and postgres 8.3.  I'm using md5 for
authentication,and have the appropriate .pgpass file with u=rw permissions in the user's home directory.  I can access
mydatabase, called radiovision, using psql -U radiovision.  I think that means the authentication is working properly
(i.e.postgres does not ask for a password for radiovision or give me any authentication errors).  However, when I try
tocreate a backup using pg_dump -C radiovision, I am prompted for a password to which I respond with radiovision's
password. I then get the error: 
>
> connection to database "radiovision" failed:  FATAL:  password authentication failed for user "DrRudner".

try pg_dump -U radiovision -C radiovision   ...



--
john r pierce                                      37N 122W
somewhere on the middle of the left coast



Re: problems with permissions

From
Adrian Klaver
Date:
On 04/25/2014 07:11 PM, Eric Smith wrote:
> All,
>
> Having a problem dumping a database using pg_dump. This is Mac OS 10.9.2 and postgres 8.3.  I'm using md5 for
authentication,and have the appropriate .pgpass file with u=rw permissions in the user's home directory.  I can access
mydatabase, called radiovision, using psql -U radiovision.  I think that means the authentication is working properly
(i.e.postgres does not ask for a password for radiovision or give me any authentication errors).  However, when I try
tocreate a backup using pg_dump -C radiovision, I am prompted for a password to which I respond with radiovision's
password. I then get the error: 
>
> connection to database "radiovision" failed:  FATAL:  password authentication failed for user "DrRudner".
>
>
> Why is postgres asking for a password for DrRudner?  This is the mac username of the user currently logged in, and
alsothe user that installed postgres initially. 

Because in the absence of the -U argument Postgres will use the default
user, which is the logged in user. Per Johns post use -U to eliminate
the guesswork:)

>
> Any help is much appreciated!!
>
> Regards,
> Eric
>
>
>


--
Adrian Klaver
adrian.klaver@aklaver.com