- Install postgres.
- Setup password for
postgreslinux user:sudo passwd postgres - Switch to this user:
su - postgres - Run
psql -U postgres - Create user with your name as in linux. Grant it some privileges. For all privileges:
CREATE USER {your_username} WITH ENCRYPTED PASSWORD '{your_password}';
ALTER USER {your_username} WITH SUPERUSER;
- Login to your linux user account and run
psqlto login as you.
P.S. the thing is that postgres allows only the linux users with the same name as postgres users to login.