title: Create user postgres on Ubuntu
body: <p>So I have installed postgresql9.3 on Ubuntu.
  Now I have to create a new user. So everything is possible with the superuser postgres. But I need for every new db a new user.</p>
  
  <p>So what I did:</p>
  
  <pre><code>sudo -u postgres psql
  CREATE USER python with PASSWORD 'python';
  CREATE DATABASE dbpython;
  GRANT ALL PRIVILEGES ON DATABASE dbpython to python;
  </code></pre>
  
  <p>I also modified the /etc/postgresql/9.1/main/pg_hba.conf file and change the authentication setting of local frompeer to md5.</p>
  
  <p>After I've restarted postgres I want use my new user:</p>
  
  <pre><code>ubuntu@ip-172-31-33-139:~$ su python 
  No passwd entry for user 'python'
  </code></pre>
  
  <p>But</p>
  
  <pre><code>ubuntu@ip-172-31-33-139:~$ sudo service postgresql restart
   * Restarting PostgreSQL 9.3 database server                             [ OK ]
  ubuntu@ip-172-31-33-139:~$ psql -d dbpython -U python
  Password for user python:
  psql (9.3.6)
  Type "help" for help.
  
  dbpython=&gt;
  </code></pre>
  
  <p>Why is that working and the su python isn't?
  Important remark: I dit not create a new python user in my Ubuntu, I hope this isn't necessary for every new user on postgres.</p>