I just started playing around with PostgreSQL. My goal is to create a new user outside of postgres with all of the same privileges and create a database for my ror app. I'm able to login under postgres. I did create an user named Jason, which is good, however when I do sudo -u username psql I receive the following error...
sudo: unknown user: Jason
sudo: unable to initialize policy plugin
I can determine that the username exists by checking both \dg in my postgres console.
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------+-----------
Jason | Superuser, Create role, Create DB, Replication | {}
postgres | Superuser, Create role, Create DB, Replication | {}
What's causing this problem? Also, I checked my local pg_hba.conf and have what I believe to be the correct settings.
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5