title: Becoming a superuser postgresql
body: <p>How do i make myself a superuser on postgresql?</p>
  
  <p>I keep trying to create a database and I keep getting the following errors:</p>
  
  <blockquote>
    <p>createdb: database creation failed: ERROR:  permission denied to create database</p>
  </blockquote>
  
  <p>I'm guessing this is because i'm not a superuser but i don't know what's wrong. 
  Here's what i did:</p>
  
  <pre><code>&gt; sudo su postgres
  
  &gt; postgres@precise64:/xxx/xxx/projectfile$createuser -P
  &gt; Enter name of role to add: vagrantUser
  &gt; Enter password: 
  &gt; Enter it again:
  &gt; Shall the new role be a superuser? (y/n) y
  &gt; postgres@precise64:/vagrant/django_projects/mblog$ psql -U vagrantUser template1
  &gt; psql: FATAL:  Peer authentication failed for user "vagrantUser"
  &gt; postgres@precise64:/vagrant/django_projects/mblog$ exit
  &gt; (venv)vagrant@precise64:/vagrant/project$:psql template1
  &gt; template1 =# \q
  &gt; (venv)vagrant@precise64:/vagrant/project$:createdb mydb
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>createdb: database creation failed: ERROR:  permission denied to create database</p>
  </blockquote>
  
  <p>Pleae help</p>