Yes, but it is supposed that "pgpass.conf" is used when "-w" is specified.
I have used this same approach in other server with another DB and it works fine.
On Wed, Nov 16, 2016 at 8:45 PM, Stephen Cook <sclists@gmail.com> wrote:
On 2016-11-16 20:39, JORGE MALDONADO wrote: > I am trying to run pg_dump to backup my PostgreSQL DB and I am getting a > "fe_sendauth: no pssword supplied" error message. This is a Windows > Server 2012 environment and I am issuing pg_dump from a command prompt. > > The command is as follows: > pg_dump -E win1252 -f d:/respaldos/chartsclub/basedatos/CC.backup -F p > -n chartsclub -h localhost -U postgres -w chartsclub
That "-w" makes pg_dump not ask for a password, so you will get an error if the user requires password authentication.