It then asks for a password. What password is it? There are now passwords set on my system. Also tried editing pg_hba.conf. But could not solve the problem.
How do I move ahead.
it's not clear what is wrong there, but try this:
1. Add this line to the beginning of your pg_hba.conf: host all all 127.0.0.1/32 trust
2. restart postgresql server.
3. you should be able to connect without password.
Please post such basic questions to pgsql-general mailing list.