= Postgres HowTo login without password tags: [[postgres]] [[HowTo]] == Procedure 1. Create a file in your home directory called `.pgpass` 2. The contents of this file should take the format: {{{ hostname:port:database:username:password }}} For example, here the port and database have been left blank: {{{ localhost:*:*:username:password }}} You may have to add a record for `127.0.0.1` as well as `localhost`. 3. Make sure that the file has the correct permissions by running: `chmod 600 .pgpass` 4. Connect using the following command: {{{ psql -U username -d dbname }}} [[BackLinks]]