The file .pgpass
starts with a dot and therefore is hidden from view by default in most file managers, but you should be able to access it through Terminal. You probably don't need the .pgpass
file, so it may be a good idea to delete it. If you do decide to keep it, edit the password file according to the documentation and run chmod 0600 ~/.pgpass
to fix the permissions.
PostgreSQL user accounts are independent of the operating system, but remember that unless specified on the command line, psql
will use the current user's system username as both the database name and PostgreSQL username; an error will occur if a database or user by this name does not exist on the database cluster. To add users, run psql
as the postgres
user, then use the CREATE ROLE
or CREATE USER
SQL commands. Unless the users will connect to the same database, you may want to create databases for each user to avoid errors.