You only need to specify those settings that differ from the defaults. So unless you've changed your server's default configuration, usually this means you only need to specify a dbname and a user.
Localhost is the default host. But if you want to explicitly specify it, then it should just be "localhost"; no number. Similarly, PostgreSQL's default port is 5432, unless you've changed it.
I'm also guessing you don't have privileges to connect as the postgres user. Although you haven't specified what system you're working on (Windows? Linux?), or what the actual error message is you're getting.