title: Accessing postgres without being root users
body: <p>I have created a postgres database in postgres named "databaseName". Now I can access this data2database through </p>
  
  <pre><code> su - postgres
  </code></pre>
  
  <p>and then typing my password</p>
  
  <p>Then I enter into the database through: psql databaseName</p>
  
  <p>I have created users of this database through:</p>
  
  <pre><code>   createuser -P userName1
  </code></pre>
  
  <p>Now I dont want the users of the database to access the database as root user. Now when the  users try to login into postgres as </p>
  
  <pre><code> su - postgres -u userName1 
          or through
   psql databaseName -u userName1
  </code></pre>
  
  <p>I get error...can someone guide me as to how the users can get access to postgres and database without being root user?</p>