title: WSL Postgres Connections
body: <p>I'm struggling to get Rails up and running through Windows Bash - for some reason, PostgreSQL is requiring passwords for all TCP/IP connections. It does not prompt for a password when connecting through a unix socket. Ideally my environment would never require a password.</p>
  
  <p>All the advice I can find on this issue points to modifying the <code>pg_hba.conf</code> file. I've edited mine accordingly - there's only one (v9.5). I've reloaded the config via <code>select pg_reload_conf();</code> and restarted the service to no avail.</p>
  
  <pre><code># Database administrative login by Unix domain socket
  local   all             postgres                                trust
  # TYPE  DATABASE        USER            ADDRESS                 METHOD
  # "local" is for Unix domain socket connections only
  local   all             all                                     trust
  # IPv4 local connections:
  host    all             all             127.0.0.1/32            trust
  # IPv6 local connections:
  host    all             all             ::1/128                 trust
  </code></pre>
  
  <p>I've tried to remove the password from the default "postgres" account, but it still requires the password "root" when I try to connect via <code>$ psql -h localhost -U postgres</code>. When I supply no password, I get <code>psql: fe_sendauth: no password supplied</code> and the prompt terminates.</p>
  
  <p>I've created a new role, <code>root</code>, with no password. This has the same behavior, except the password "root" doesn't work - I'm not sure what password it expects, but it does expect one.</p>
  
  <p>Little lost on what to do next. Everything I can find online points to modifying the <code>pg_hba.conf</code> file to look similar to what I have. I've tried uninstalling/reinstalling postgresql packages, but ran into the same problem. Any ideas?</p>