1

I'm new to using Postgres, and I'm currently trying to create a new user. However, when it asks for a password, I enter my system password, and the authentication keeps failing.

Alex$ createuser user1
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
WARNING: password file "/Users/Alex/.pgpass" has group or world access; permissions should be u=rw (0600) or less
Password:
createuser: could not connect to database postgres: FATAL:  password authentication failed for user "Alex"

I know that I'm entering my system password correctly. Is there another password that I'm supposed to be using, or does this have something to do with the world access error?

1 Answer 1

2

First fix the permissions of .pgpass to 600 and try again (See here http://www.postgresql.org/docs/9.1/static/libpq-pgpass.html) Are you supposed to connect with user Alex to the database?

Sign up to request clarification or add additional context in comments.

7 Comments

Where can I find the pgpass.conf file? I searched my whole system for it, but I can't find it anywhere. I am supposed to connect with the user Alex.
pgpass.conf is only for Windows. As i can see you are on Mac and your file is in "/Users/Alex/.pgpass" so execute: chmod 600 /Users/Alex/.pgpass
that file doesn't exist either. Do I need to create it?
It will not warn you if you don't have it. I've tried it on my mac.
OK. I ended up finding the .pgpass file...I couldn't find it earlier because it was hidden. It was blank. So I deleted it, and I'm still having the same problem.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.