psql: FATAL: database “” does not exist
It appears that your package manager failed to create the database named $user for you. The reason that psql -d template1 works for you is that template1 is a database created by postgres itself, and is present on all installations. You are apparently able to log in to template1, so you must have some rights … Read more