“connection error” or “authentication problem” when trying to register a new server in pgAdmin III?
(ubuntu or xubuntu)
This post shows how to obtain & setup the “Host”, “Port”, “Username”, and “Password” of postgresql.
1) Obtain default port. To do that, open up /etc/postgresql/x.xversion/main/postgresql.conf
See “port= 5432″. You may change the port used by postgresql.
2) Obtain Host.
Search the listen_addresses. For instance, here 'localhost' is my defaut host. You may alter the host here.
3) Change password.
Open terminal.
———————————————–
~$: psql -d postgres -U postgres
psql (9.1.3) Type "help" for help.postgres=# alter user postgres with password 'mynewpassword'; ALTER ROLEpostgres=# q~$:sudo /etc/init.d/postgresql restart———————————————————-
Now you can run pgAdminIII. On form New Server Registration, set ‘Username’ to “postgres”, type in password you entered before, and the field ‘Name’ is up to your choice.
Tagged: connection, New Server Registration, Password, pgAdminIII, postgresql, Server, ubuntu

Awesome article.