This will fix your ability to log in as root on postgresql Fixing the root issue with postgrepsql ===================== 3 steps only! sudo -u postgres psql CREATE USER root SUPERUSER; CREATE ROLE root SUPERUSER LOGIN PASSWORD 'password'; ===================== How to Create a Superuser in PostgreSQL To run psql using "UNIX USER" postgres, you need to invoke "sudo -u postgres psql", which switches to "UNIX USER" postgres and run the psql command.