Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to enable a new user to have the same rights as postgres user on the master node

Highlighted

How to enable a new user to have the same rights as postgres user on the master node

Explorer

I want to access postgres db server from a new user created say X.

I could create database and users within postgres by switching to postgres user

But when my component is getting deployed, I need to use my newly created user X.

From user X, I need to execute few postgres commands..

But from user X, if I even type psql, I get the following error.

psql: FATAL: no pg_hba.conf entry for host "[local]", user "jenkins", database "jenkins", SSL off

How to give same permissions as postgres user to my custom user?

All this happens in the master node of the cluster created via Spark+Hive CloudController template

3 REPLIES 3

Re: How to enable a new user to have the same rights as postgres user on the master node

@Ariya Bala Sadaiappan

You should be able to create the user with SUPERUSER privileges in PostgreSQL:

create user X SUPERUSER;

Source: PostgreSQL create user syntax reference

Highlighted

Re: How to enable a new user to have the same rights as postgres user on the master node

Explorer

@emaxwell

The need is not to create user within postgres, but to connect postgres and run psql from the machine user(for ex: user cloudbreak)

I am able to run psql as postgres user, but not with others.

So can you tell me how can I make non-postgres users to run psql commands.

Also can you share the postgres user password, so that I can hack giving rights of postgres users to other users

Highlighted

Re: How to enable a new user to have the same rights as postgres user on the master node

Explorer

Made it possible by editing the pg_hba.conf under /var/lib/pgsql9/data. Modified the acccess that was granted to postgres to all. And changed peer to trust

Don't have an account?
Coming from Hortonworks? Activate your account here