Pgadmin gives mij the error: no password supplied – Stack Overflow

Get via App Store Read this postbode te our app!

pgadmin gives mij the error: no password supplied

I’ve installed postgresql 9.Two on linux (kubuntu) and the last version of pgadmin3, but when I connect them I have this error:

An error has occurred: Error connecting to the server: fe_sendauth: no password supplied

I have also configured tomcat for my web application te java. Ter fact, postgresql wasgoed working before attempting my application.

Two Answers

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

I quote the help shipped with pgAdmin for the “Host” field te the connection (“server”) settings:

The host is the IP address of the machine to voeling, or the fully qualified domain name. On Unix based systems, the address field may be left wit 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 voorwaarde start 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 verkeersopstopping:

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

I realize this is question is years old, but I ran into this same problem today and have a solution that uses trust ter a limited but useful way.

Spil te many development shops, when the devs need a QA postgres password, they just yell it, message it, email it, write it on their foreheads, etc. And I’m like, “This is indeed bad. I need to figure out a way to use PKI here.” Wij also use pgAdmin3.

Very first, add a line like this to your pg_hba.conf, where dev represents the user for the developers ter your shop:

host all dev trust

Druppel the developers’ public key te their authorized_keys folder on the database server. Now have them ssh into the server with the -L flag with a guideline similar to the following:

/.ssh/id_rsa -L5432: -vvv

This permits one to use the postgres port spil if it were localhost. Of course, substitute the key, server and make sure to ordner to an open port locally (if you have a local postgres running, it’s most likely corded to 5432). I use a pretty verbose flag so I can lightly troubleshoot any ssh issues.

Open another terminal and punt this directive:

psql -h -U dev -p 5432

You should have access to the database and never be prompted for a password, which I think is excellent because otherwise, the devs will just waive the password around with little regard to security, passing it out like Halloween candy.

Spil of now, PgAdmin3 will still prompt you for a password, even tho’ — plain spil day — you do not need it. But other postgres GUIs will not. Attempt Postico. It’s ter beta but works fine.

I hope this reaction helps anyone like mij who would rather use PKI for postgres auth rather than sharing passwords willy-nilly.

Related movie: Five Ways to Earn $Two,100+ te Cryptocurrencies without Trading!

Leave a Reply

Your email address will not be published. Required fields are marked *