pgAdmin and sudo mode

Поиск
Список
Период
Сортировка
Искать

pgAdmin and sudo mode

От:
Adam Pearson <Adam.Pearson@4finance.com>
Дата:

Hello all,

                Does anyone know if you can use ‘sudo’ in pgAdmin?

 

Currently my login doesn’t have full access to the system, when I sudo into the admin account I can alter / drop / create objects / permissions etc.

 

I don’t know the sudo account password and the DevOps team don’t hand this out (I’m a DBA) so when using pgAdmin options are fairly limited.

 

I can run the commands in a psql console, but it kind of seems a shame to lose the auto complete and ease of use of the gui when writing scripts.

 

Googling doesn’t appear to display any results and when looking at the help file none of the start options appear to list this as an option.

 

I’m running pgAdmin 1.20 on Windows 7.

Servers are Linux.

 

Any suggestions to this would be appreciated.

 

Thanks,

Adam

 

 

Re: pgAdmin and sudo mode

От:
Wim Bertels <wim.bertels@khleuven.be>
Дата:
Hallo Adam,

if you are a dba,
probably what u are looking for is a superuser account.

start pgadmin,
in the sql window,
type create user,
select create user and hit the help/questionmark button

sudo does not exist in sql

mvg,
Wim

Adam Pearson schreef op di 01-09-2015 om 08:49 [+0000]:
> Hello all,
> 
>                 Does anyone know if you can use ‘sudo’ in pgAdmin?
> 
>  
> 
> Currently my login doesn’t have full access to the system, when I sudo
> into the admin account I can alter / drop / create objects /
> permissions etc.
> 
>  
> 
> I don’t know the sudo account password and the DevOps team don’t hand
> this out (I’m a DBA) so when using pgAdmin options are fairly limited.
> 
>  
> 
> I can run the commands in a psql console, but it kind of seems a shame
> to lose the auto complete and ease of use of the gui when writing
> scripts.
> 
>  
> 
> Googling doesn’t appear to display any results and when looking at the
> help file none of the start options appear to list this as an option.
> 
>  
> 
> I’m running pgAdmin 1.20 on Windows 7.
> 
> Servers are Linux.
> 
>  
> 
> Any suggestions to this would be appreciated.
> 
>  
> 
> Thanks,
> 
> Adam
> 
>  
> 
>  
> 
> 

-- 
mvg,
Wim Bertels

--
Wim Bertels
Lector
UC Leuven-Limburg
--
Things past redress and now with me past care.	-- William Shakespeare, "Richard II"



Re: pgAdmin and sudo mode

От:
Adam Pearson <Adam.Pearson@4finance.com>
Дата:
Thanks for the response Wim, unfortunately creation of SuperUser accounts isn't something we're allowed to do (company policy) with the idea that there should only be this 1 superuser account that we sudo into for elevated permissions

-----Original Message-----
From: Wim Bertels [mailto:wim.bertels@khleuven.be] 
Sent: 01 September 2015 10:56 AM
To: Adam Pearson
Cc: pgadmin-support@postgresql.org
Subject: Re: [pgadmin-support] pgAdmin and sudo mode

Hallo Adam,

if you are a dba,
probably what u are looking for is a superuser account.

start pgadmin,
in the sql window,
type create user,
select create user and hit the help/questionmark button

sudo does not exist in sql

mvg,
Wim

Adam Pearson schreef op di 01-09-2015 om 08:49 [+0000]:
> Hello all,
> 
>                 Does anyone know if you can use ‘sudo’ in pgAdmin?
> 
>  
> 
> Currently my login doesn’t have full access to the system, when I sudo 
> into the admin account I can alter / drop / create objects / 
> permissions etc.
> 
>  
> 
> I don’t know the sudo account password and the DevOps team don’t hand 
> this out (I’m a DBA) so when using pgAdmin options are fairly limited.
> 
>  
> 
> I can run the commands in a psql console, but it kind of seems a shame 
> to lose the auto complete and ease of use of the gui when writing 
> scripts.
> 
>  
> 
> Googling doesn’t appear to display any results and when looking at the 
> help file none of the start options appear to list this as an option.
> 
>  
> 
> I’m running pgAdmin 1.20 on Windows 7.
> 
> Servers are Linux.
> 
>  
> 
> Any suggestions to this would be appreciated.
> 
>  
> 
> Thanks,
> 
> Adam
> 
>  
> 
>  
> 
> 

--
mvg,
Wim Bertels

--
Wim Bertels
Lector
UC Leuven-Limburg
--
Things past redress and now with me past care.	-- William Shakespeare, "Richard II"

Re: pgAdmin and sudo mode

От:
Wim Bertels <wim.bertels@khleuven.be>
Дата:
Adam Pearson schreef op di 01-09-2015 om 11:01 [+0000]:
> Thanks for the response Wim, unfortunately creation of SuperUser accounts isn't something we're allowed to do (company policy) with the idea that there should only be this 1 superuser account that we sudo into for elevated permissions
> 
> -----Original Message-----
> From: Wim Bertels [mailto:wim.bertels@khleuven.be] 
> Sent: 01 September 2015 10:56 AM
> To: Adam Pearson
> Cc: pgadmin-support@postgresql.org
> Subject: Re: [pgadmin-support] pgAdmin and sudo mode
> 
> Hallo Adam,
> 
> if you are a dba,
> probably what u are looking for is a superuser account.
> 
> start pgadmin,
> in the sql window,
> type create user,
> select create user and hit the help/questionmark button
> 
> sudo does not exist in sql

as said sudo in sql does not exist:
the closed you'll find is 

\h set session authorization 
Command:     SET SESSION AUTHORIZATION
Description: set the session user identifier and the current user
identifier of the current session
Syntax:
SET [ SESSION | LOCAL ] SESSION AUTHORIZATION user_name
SET [ SESSION | LOCAL ] SESSION AUTHORIZATION DEFAULT
RESET SESSION AUTHORIZATION

\h set role
Command:     SET ROLE
Description: set the current user identifier of the current session
Syntax:
SET [ SESSION | LOCAL ] ROLE role_name
SET [ SESSION | LOCAL ] ROLE NONE
RESET ROLE

they are different.., 
http://www.postgresql.org/docs/current/static/sql-set-session-authorization.html

mvg,
Wim

> 
> mvg,
> Wim
> 
> Adam Pearson schreef op di 01-09-2015 om 08:49 [+0000]:
> > Hello all,
> > 
> >                 Does anyone know if you can use ‘sudo’ in pgAdmin?
> > 
> >  
> > 
> > Currently my login doesn’t have full access to the system, when I sudo 
> > into the admin account I can alter / drop / create objects / 
> > permissions etc.
> > 
> >  
> > 
> > I don’t know the sudo account password and the DevOps team don’t hand 
> > this out (I’m a DBA) so when using pgAdmin options are fairly limited.
> > 
> >  
> > 
> > I can run the commands in a psql console, but it kind of seems a shame 
> > to lose the auto complete and ease of use of the gui when writing 
> > scripts.
> > 
> >  
> > 
> > Googling doesn’t appear to display any results and when looking at the 
> > help file none of the start options appear to list this as an option.
> > 
> >  
> > 
> > I’m running pgAdmin 1.20 on Windows 7.
> > 
> > Servers are Linux.
> > 
> >  
> > 
> > Any suggestions to this would be appreciated.
> > 
> >  
> > 
> > Thanks,
> > 
> > Adam
> > 
> >  
> > 
> >  
> > 
> > 
> 
> --
> mvg,
> Wim Bertels
> 
> --
> Wim Bertels
> Lector
> UC Leuven-Limburg
> --
> Things past redress and now with me past care.
> 		-- William Shakespeare, "Richard II"
> 

-- 
mvg,
Wim Bertels

--
Wim Bertels
Lector
UC Leuven-Limburg
--
Nothing so needs reforming as other people's habits.	-- Mark Twain, "Pudd'nhead Wilson's Calendar"



Re: pgAdmin and sudo mode

От:
Adam Pearson <Adam.Pearson@4finance.com>
Дата:
Hello Wim,I've had a look at the SET options and unfortunately still get the authorisation error when trying to impersonate the superuser account / role, appears that it's locked down using the SET command.

I guess I'll have to stick to psql and the putty console for elevated permissions.  A shame since seems a little clunky.

Thanks again for trying to help.

Adam

-----Original Message-----
From: Wim Bertels [mailto:wim.bertels@khleuven.be] 
Sent: 01 September 2015 12:15 PM
To: Adam Pearson
Cc: pgadmin-support@postgresql.org
Subject: Re: [pgadmin-support] pgAdmin and sudo mode

Adam Pearson schreef op di 01-09-2015 om 11:01 [+0000]:
> Thanks for the response Wim, unfortunately creation of SuperUser 
> accounts isn't something we're allowed to do (company policy) with the 
> idea that there should only be this 1 superuser account that we sudo 
> into for elevated permissions
> 
> -----Original Message-----
> From: Wim Bertels [mailto:wim.bertels@khleuven.be]
> Sent: 01 September 2015 10:56 AM
> To: Adam Pearson
> Cc: pgadmin-support@postgresql.org
> Subject: Re: [pgadmin-support] pgAdmin and sudo mode
> 
> Hallo Adam,
> 
> if you are a dba,
> probably what u are looking for is a superuser account.
> 
> start pgadmin,
> in the sql window,
> type create user,
> select create user and hit the help/questionmark button
> 
> sudo does not exist in sql

as said sudo in sql does not exist:
the closed you'll find is 

\h set session authorization 
Command:     SET SESSION AUTHORIZATION
Description: set the session user identifier and the current user identifier of the current session
Syntax:
SET [ SESSION | LOCAL ] SESSION AUTHORIZATION user_name SET [ SESSION | LOCAL ] SESSION AUTHORIZATION DEFAULT RESET SESSION AUTHORIZATION

\h set role
Command:     SET ROLE
Description: set the current user identifier of the current session
Syntax:
SET [ SESSION | LOCAL ] ROLE role_name
SET [ SESSION | LOCAL ] ROLE NONE
RESET ROLE

they are different..,
http://www.postgresql.org/docs/current/static/sql-set-session-authorization.html

mvg,
Wim

> 
> mvg,
> Wim
> 
> Adam Pearson schreef op di 01-09-2015 om 08:49 [+0000]:
> > Hello all,
> > 
> >                 Does anyone know if you can use ‘sudo’ in pgAdmin?
> > 
> >  
> > 
> > Currently my login doesn’t have full access to the system, when I 
> > sudo into the admin account I can alter / drop / create objects / 
> > permissions etc.
> > 
> >  
> > 
> > I don’t know the sudo account password and the DevOps team don’t 
> > hand this out (I’m a DBA) so when using pgAdmin options are fairly limited.
> > 
> >  
> > 
> > I can run the commands in a psql console, but it kind of seems a 
> > shame to lose the auto complete and ease of use of the gui when 
> > writing scripts.
> > 
> >  
> > 
> > Googling doesn’t appear to display any results and when looking at 
> > the help file none of the start options appear to list this as an option.
> > 
> >  
> > 
> > I’m running pgAdmin 1.20 on Windows 7.
> > 
> > Servers are Linux.
> > 
> >  
> > 
> > Any suggestions to this would be appreciated.
> > 
> >  
> > 
> > Thanks,
> > 
> > Adam
> > 
> >  
> > 
> >  
> > 
> > 
> 
> --
> mvg,
> Wim Bertels
> 
> --
> Wim Bertels
> Lector
> UC Leuven-Limburg
> --
> Things past redress and now with me past care.
> 		-- William Shakespeare, "Richard II"
> 

--
mvg,
Wim Bertels

--
Wim Bertels
Lector
UC Leuven-Limburg
--
Nothing so needs reforming as other people's habits.	-- Mark Twain, "Pudd'nhead Wilson's Calendar"

Re: pgAdmin and sudo mode

От:
Wim Bertels <wim.bertels@khleuven.be>
Дата:
If u the cmdline to become the 'postgres' user,
then with this user(=postgres) u can 'grant' the privileges you need to
a role.

Adam Pearson schreef op wo 02-09-2015 om 09:04 [+0000]:
> Hello Wim,
> 	I've had a look at the SET options and unfortunately still get the authorisation error when trying to impersonate the superuser account / role, appears that it's locked down using the SET command.
> 
> I guess I'll have to stick to psql and the putty console for elevated permissions.  A shame since seems a little clunky.
> 
> Thanks again for trying to help.
> 
> Adam
> 
> -----Original Message-----
> From: Wim Bertels [mailto:wim.bertels@khleuven.be] 
> Sent: 01 September 2015 12:15 PM
> To: Adam Pearson
> Cc: pgadmin-support@postgresql.org
> Subject: Re: [pgadmin-support] pgAdmin and sudo mode
> 
> Adam Pearson schreef op di 01-09-2015 om 11:01 [+0000]:
> > Thanks for the response Wim, unfortunately creation of SuperUser 
> > accounts isn't something we're allowed to do (company policy) with the 
> > idea that there should only be this 1 superuser account that we sudo 
> > into for elevated permissions
> > 
> > -----Original Message-----
> > From: Wim Bertels [mailto:wim.bertels@khleuven.be]
> > Sent: 01 September 2015 10:56 AM
> > To: Adam Pearson
> > Cc: pgadmin-support@postgresql.org
> > Subject: Re: [pgadmin-support] pgAdmin and sudo mode
> > 
> > Hallo Adam,
> > 
> > if you are a dba,
> > probably what u are looking for is a superuser account.
> > 
> > start pgadmin,
> > in the sql window,
> > type create user,
> > select create user and hit the help/questionmark button
> > 
> > sudo does not exist in sql
> 
> as said sudo in sql does not exist:
> the closed you'll find is 
> 
> \h set session authorization 
> Command:     SET SESSION AUTHORIZATION
> Description: set the session user identifier and the current user identifier of the current session
> Syntax:
> SET [ SESSION | LOCAL ] SESSION AUTHORIZATION user_name SET [ SESSION | LOCAL ] SESSION AUTHORIZATION DEFAULT RESET SESSION AUTHORIZATION
> 
> \h set role
> Command:     SET ROLE
> Description: set the current user identifier of the current session
> Syntax:
> SET [ SESSION | LOCAL ] ROLE role_name
> SET [ SESSION | LOCAL ] ROLE NONE
> RESET ROLE
> 
> they are different..,
> http://www.postgresql.org/docs/current/static/sql-set-session-authorization.html
> 
> mvg,
> Wim
> 
> > 
> > mvg,
> > Wim
> > 
> > Adam Pearson schreef op di 01-09-2015 om 08:49 [+0000]:
> > > Hello all,
> > > 
> > >                 Does anyone know if you can use ‘sudo’ in pgAdmin?
> > > 
> > >  
> > > 
> > > Currently my login doesn’t have full access to the system, when I 
> > > sudo into the admin account I can alter / drop / create objects / 
> > > permissions etc.
> > > 
> > >  
> > > 
> > > I don’t know the sudo account password and the DevOps team don’t 
> > > hand this out (I’m a DBA) so when using pgAdmin options are fairly limited.
> > > 
> > >  
> > > 
> > > I can run the commands in a psql console, but it kind of seems a 
> > > shame to lose the auto complete and ease of use of the gui when 
> > > writing scripts.
> > > 
> > >  
> > > 
> > > Googling doesn’t appear to display any results and when looking at 
> > > the help file none of the start options appear to list this as an option.
> > > 
> > >  
> > > 
> > > I’m running pgAdmin 1.20 on Windows 7.
> > > 
> > > Servers are Linux.
> > > 
> > >  
> > > 
> > > Any suggestions to this would be appreciated.
> > > 
> > >  
> > > 
> > > Thanks,
> > > 
> > > Adam
> > > 
> > >  
> > > 
> > >  
> > > 
> > > 
> > 
> > --
> > mvg,
> > Wim Bertels
> > 
> > --
> > Wim Bertels
> > Lector
> > UC Leuven-Limburg
> > --
> > Things past redress and now with me past care.
> > 		-- William Shakespeare, "Richard II"
> > 
> 
> --
> mvg,
> Wim Bertels
> 
> --
> Wim Bertels
> Lector
> UC Leuven-Limburg
> --
> Nothing so needs reforming as other people's habits.
> 		-- Mark Twain, "Pudd'nhead Wilson's Calendar"
> 

-- 
mvg,
Wim Bertels

--
Wim Bertels
Lector
UC Leuven-Limburg
--
I reverently believe that the maker who made us all  makes everything in New
England, but the weather.  I don't know who makes that, but I think it must be
raw apprentices in the weather-clerks factory who experiment and learn how, in
New England, for board and clothes, and then are promoted to make weather for
countries that require a good article, and will take their custom elsewhere
if they don't get it.	-- Mark Twain



FAQ