AnsweredAssumed Answered

Postgres read Only User

Question asked by wahabak on Nov 16, 2017
Latest reply on Nov 16, 2017 by Hiko_Davis

I have a requirement to create a read only user in APMDB which is PostgreSQL database in our environment. when I am trying to create readonly only I am getting following ERRORS

 

cemdb=> CREATE USER mcnealj;
ERROR:  permission denied to create role
cemdb=> \q
[wahabak@sp-sec-stgapmdb ~]$ psql postgres admin
Password for user admin:
psql (8.4.20, server 9.2.9)
WARNING: psql version 8.4, server version 9.2.
         Some psql features might not work.
Type "help" for help.

postgres=> CREATE USER mcnealj;
ERROR:  permission denied to create role
postgres=>

 

postgres=> \du
            List of roles
 Role name | Attributes  | Member of
-----------+-------------+-----------
 admin     |             | {}
 postgres  | Superuser   | {}
           : Create role
           : Create DB

 

 

I try to create read only user in both ways. using postgres user and cemdb but  unsuccessful. Does any one try this before can help me ? 

Outcomes