pgadmin gives me the error: no password supplied

Whether a password is required depends on your settings in pg_hba.conf. And there are different ways you can connect - different settings in pg_hba.conf may apply.

I quote the help shipped with pgAdmin 3 for the "Host" field in the connection ("server") settings:

The host is the IP address of the machine to contact, or the fully qualified domain name. On Unix based systems, the address field may be left blank to use the default PostgreSQL Unix Domain Socket on the local machine, or be set to an alternate path containing a PostgreSQL socket. If a path is entered, it must begin with a “/”. The port number may also be specified.

If you connect via Unix socket the rules for "local" apply. Whereas when connecting via TCP/IP "host" (or "hostssl") rules applies.

If you have a line like this at the top your pg_hba.conf file:

local    all     all     peer

or:

local    all     all     ident

.. then you can connect locally without password if your system user is "postgres" and your database user is "postgres", too.


Change the password for role postgres:

sudo -u postgres psql postgres

alter user postgres with password 'postgres';

Try connect using "postgres" for both username and password.

Refer to: How to change PostgreSQL user password