I installed Postgres with this command
sudo apt-get install postgresql postgresql-client postgresql-contrib libpq-dev
Using psql --ve
psql --ve
First you should change the password using terminal. (username is postgres)
postgres=# \password postgres
Then you will be prompted to enter the password and confirm it.
Now you will be able to connect using pgadmin with the new password.