title: Switch to postgres user on Mac
body: <p>I would like to <code>su</code> to the postgres user on Mac, so that I can run postgres. </p>
  
  <p>What am I doing wrong here?</p>
  
  <pre><code>delirium:~ anna$ sudo su postgres
  delirium:~ anna$
  </code></pre>
  
  <p>Nothing happens. If I try to run postgres, I then get something like this:</p>
  
  <pre><code>delirium:~ anna$ sudo pg_ctl -D /usr/local/var/postgres -l      
  /usr/local/var/postgres/server.log startpg_ctl: cannot be run as root
  Please log in (using, e.g., "su") as the (unprivileged) user that will
  own the server process.
  </code></pre>
  
  <p>If I try this in order to <code>su</code>, I also get an error: </p>
  
  <pre><code>delirium:~ anna$ sudo su - postgres
  su: no directory
  delirium:~ anna$
  </code></pre>
  
  <p>What can I do instead? I'm fairly sure that the postgres user exists. </p>