title: Can not enter and change PostgreSQL pg_hba.conf file
body: <p>I am running OSX, I am trying to change the PostgreSQL authentication options in the pg_hba.conf file. The problem is I can't get into it. I have tried </p>
  
  <pre><code>sudo su - postgres
  </code></pre>
  
  <p>Then used vi to try to edit it. When I open the file with vi, vi displays as if it's a new file, showing only tilde lines. If I try to write that new file, I get an error saying I am not able to do so. </p>
  
  <p>PLease help, thanks</p>
  
  <p>this is my directory:</p>
  
  <pre><code>$ sudo find / -name pg_hba.conf
  Password:
  find: /dev/fd/3: Not a directory
  find: /dev/fd/4: Not a directory
  /Library/PostgreSQL/9.1/data/pg_hba.conf
  </code></pre>