After create a new user in my postgresql server with this commands:
#su postgres
CREATE ROLE kleber WITH LOGIN;
ALTER ROLE kleber WITH PASSWORD '...';
i try login with this user with this command:
# psql -U kleber -W
but I get this error:
psql: FATAL: Peer authentication failed for user "kleber"
what i am missing here?
-Wasks psql to not to prompt for the password. If you want to use it use with pgpass file (postgresql.org/docs/9.4/static/libpq-pgpass.html)