Thread: how to allow a sysid to be a superuser?

how to allow a sysid to be a superuser?

From
"Gauthier, Dave"
Date:

Hi:

 

PG 8.3.4 on Linux.

 

A DB was created with a privileged account which has limited access.  I want a specific user (sysuid) to have “all” provs on this DB.  In fact, I want this user to have “all”  on all the dbs served by the PG instance.  Is there a way to do this such that when psql is invoked in a session of that user, he/she automatically has “all” (wothoug havng to enter “-user theuid”)?

 

Thanks

-dave

Re: how to allow a sysid to be a superuser?

From
Scott Marlowe
Date:
On Tue, Dec 8, 2009 at 9:11 AM, Gauthier, Dave <dave.gauthier@intel.com> wrote:
> PG 8.3.4 on Linux.
>
> A DB was created with a privileged account which has limited access.  I want
> a specific user (sysuid) to have “all” provs on this DB.  In fact, I want
> this user to have “all”  on all the dbs served by the PG instance.  Is there
> a way to do this such that when psql is invoked in a session of that user,
> he/she automatically has “all” (wothoug havng to enter “-user theuid”)?

Make them a superuser.  first log into psql as a superuser and issue
this command:

alter user username superuser;

tada!  they're now large and in charge of the pgsql instance and all
its databases.

Re: how to allow a sysid to be a superuser?

From
"Gauthier, Dave"
Date:
It comes back...

role "joetheplumber" does not exist

The user is a sys uid on linux.


-----Original Message-----
From: Scott Marlowe [mailto:scott.marlowe@gmail.com]
Sent: Tuesday, December 08, 2009 1:26 PM
To: Gauthier, Dave
Cc: pgsql-general
Subject: Re: [GENERAL] how to allow a sysid to be a superuser?

On Tue, Dec 8, 2009 at 9:11 AM, Gauthier, Dave <dave.gauthier@intel.com> wrote:
> PG 8.3.4 on Linux.
>
> A DB was created with a privileged account which has limited access.  I want
> a specific user (sysuid) to have "all" provs on this DB.  In fact, I want
> this user to have "all"  on all the dbs served by the PG instance.  Is there
> a way to do this such that when psql is invoked in a session of that user,
> he/she automatically has "all" (wothoug havng to enter "-user theuid")?

Make them a superuser.  first log into psql as a superuser and issue
this command:

alter user username superuser;

tada!  they're now large and in charge of the pgsql instance and all
its databases.

Re: how to allow a sysid to be a superuser?

From
Scott Marlowe
Date:
On Tue, Dec 8, 2009 at 1:44 PM, Gauthier, Dave <dave.gauthier@intel.com> wrote:
> It comes back...
>
> role "joetheplumber" does not exist
>
> The user is a sys uid on linux.

You're confusing linux users with postgresql users.  They aren't
mapped one to the other.  First you need to create a pgsql role /
user:

psql postgres
create user joetheplumber superuser;

then you'll have the account for joetheplumber as a superuser.