title: What do I need for pg_dumpall to work without a password?
body: <p>So, I've been working on setting up a <code>pg_dumpall</code> but I cannot get it to work without entering a password.</p>
  
  <p>I have tried:</p>
  
  <p><a href="https://stackoverflow.com/questions/2893954/how-to-pass-in-password-to-pg-dump">How to pass in password to pg_dump?</a></p>
  
  <p>and followed that to here:</p>
  
  <p><a href="http://www.postgresql.org/docs/8.4/static/libpq-pgpass.html" rel="nofollow noreferrer">http://www.postgresql.org/docs/8.4/static/libpq-pgpass.html</a></p>
  
  <p>and still no luck.</p>
  
  <p>My string and reaction:</p>
  
  <pre><code>pg_dumpall -U user &gt; /path/to_my/folder/test2.sql 
  Password: 
  Password: 
  Password: 
  Password: 
  Password: 
  Password: 
  Password: 
  Password: 
  Password: 
  Password: 
  </code></pre>
  
  <p>(I will make this a bash script when I get it to work without a password)</p>
  
  <p>I have tried to use <code>-w</code> but it won't dump unless there is a password. I also have put that .pgpass file in my home directory and have tried moving them to other user's home directories.</p>
  
  <p>Maybe I just didn't make my file right or I don't know maybe it's in the wrong place but here that is:</p>
  
  <p><code>*:*:*:user:password</code></p>
  
  <p>Any help would be great.<br>
  Thanks</p>