dbTalk Databases Forums  

ISM - run backups as a user other than root?

comp.databases.informix comp.databases.informix


Discuss ISM - run backups as a user other than root? in the comp.databases.informix forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Malc
 
Posts: n/a

Default ISM - run backups as a user other than root? - 07-27-2010 , 04:23 AM






One more thing ((c) 2010).

It is a TOTAL pain in that with ISM you have to be root to run the
backup commands.
The root user round here is under tighter security than a very nervous
camel's backside in a very powerful sandstorm. They are really NOT
happy about adding anything to root cron or 'at' or into their
imprenetrable schedule, and database backups don't register much if at
all on their 'things we want/need/have to do' radar.
Is there any way at all of allowing the informix user to run the
backup commands without ISM triggering the "07/27/10 10:15:41 savegrp:
You are not authorized to run this command" error? It basically means
that no bootstrap file can be created if user informix runs the
backups (whether database ot logical log)


Ta

Reply With Quote
  #2  
Old   
Neil Truby
 
Posts: n/a

Default Re: ISM - run backups as a user other than root? - 07-27-2010 , 10:02 AM






"Malc" <iiug (AT) perrior (DOT) net> wrote

Quote:
One more thing ((c) 2010).

It is a TOTAL pain in that with ISM you have to be root to run the
backup commands.
The root user round here is under tighter security than a very nervous
camel's backside in a very powerful sandstorm. They are really NOT
happy about adding anything to root cron or 'at' or into their
imprenetrable schedule, and database backups don't register much if at
all on their 'things we want/need/have to do' radar.
Is there any way at all of allowing the informix user to run the
backup commands without ISM triggering the "07/27/10 10:15:41 savegrp:
You are not authorized to run this command" error? It basically means
that no bootstrap file can be created if user informix runs the
backups (whether database ot logical log)
sudo?

Reply With Quote
  #3  
Old   
Malc
 
Posts: n/a

Default Re: ISM - run backups as a user other than root? - 07-27-2010 , 10:08 AM



On Jul 27, 4:02*pm, "Neil Truby" <neil.tr... (AT) ardenta (DOT) com> wrote:
Quote:
"Malc" <i... (AT) perrior (DOT) net> wrote in message

news:1cb6c095-0543-4031-9c82-d8d5d5f5bbd2 (AT) b5g2000vbl (DOT) googlegroups.com...

One more thing ((c) 2010).

It is a TOTAL pain in that with ISM you have to be root to run the
backup commands.
The root user round here is under tighter security than a very nervous
camel's backside in a very powerful sandstorm. They are really NOT
happy about adding anything to root cron or 'at' or into their
imprenetrable schedule, and database backups don't register much if at
all on their 'things we want/need/have to do' radar.
Is there any way at all of allowing the informix user to run the
backup commands without ISM triggering the "07/27/10 10:15:41 savegrp:
You are not authorized to run this command" error? It basically means
that no bootstrap file can be created if user informix runs the
backups (whether database ot logical log)

sudo?
Needs to be non-interactive and we don't want to hardcode passwords
anywhere...

Reply With Quote
  #4  
Old   
Clive Eisen
 
Posts: n/a

Default Re: ISM - run backups as a user other than root? - 07-27-2010 , 10:09 AM



On 27/07/2010 16:02, Neil Truby wrote:
Quote:
sudo?
suid?

--
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.

Reply With Quote
  #5  
Old   
Ian Michael Gumby
 
Posts: n/a

Default RE: ISM - run backups as a user other than root? - 07-27-2010 , 10:10 AM



Quote:
From: neil.truby (AT) ardenta (DOT) com
Subject: Re: ISM - run backups as a user other than root?
Date: Tue, 27 Jul 2010 16:02:37 +0100
To: informix-list (AT) iiug (DOT) org

"Malc" <iiug (AT) perrior (DOT) net> wrote in message
news:1cb6c095-0543-4031-9c82-d8d5d5f5bbd2 (AT) b5g2000vbl (DOT) googlegroups.com...
One more thing ((c) 2010).

It is a TOTAL pain in that with ISM you have to be root to run the
backup commands.
The root user round here is under tighter security than a very nervous
camel's backside in a very powerful sandstorm. They are really NOT
happy about adding anything to root cron or 'at' or into their
imprenetrable schedule, and database backups don't register much if at
all on their 'things we want/need/have to do' radar.
Is there any way at all of allowing the informix user to run the
backup commands without ISM triggering the "07/27/10 10:15:41 savegrp:
You are not authorized to run this command" error? It basically means
that no bootstrap file can be created if user informix runs the
backups (whether database ot logical log)

sudo?

Sudo works. We do that here with people who have to do some simple maintenance work. The only word of caution is to be careful how you log their sessions because it can really kill performance if you have an i/o bottleneck.


__________________________________________________ _______________
The New Busy is not the old busy. Search, chat and e-mail from your inbox..
http://www.windowslive.com/campaign/...M_HMP:042010_3

Reply With Quote
  #6  
Old   
Clive Eisen
 
Posts: n/a

Default Re: ISM - run backups as a user other than root? - 07-27-2010 , 10:18 AM



On 27/07/2010 16:08, Malc wrote:
Quote:
sudo?
man sudoers

no passwords required

--
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.

Reply With Quote
  #7  
Old   
Malc
 
Posts: n/a

Default Re: ISM - run backups as a user other than root? - 07-27-2010 , 10:50 AM



On Jul 27, 4:18*pm, Clive Eisen <cl... (AT) serendipita (DOT) com> wrote:
Quote:
On 27/07/2010 16:08, Malc wrote:



sudo?

man sudoers

no passwords required

Ah promising - set up an alias and assign the command string to that
alias with NOPASSWD set...
Hmm - looks like the call to 'savegrp' is made from within the legato
executable; experimentation is in order then!

Reply With Quote
  #8  
Old   
Clive Eisen
 
Posts: n/a

Default Re: ISM - run backups as a user other than root? - 07-27-2010 , 11:15 AM



On 27/07/2010 16:50, Malc wrote:
Quote:
On Jul 27, 4:18 pm, Clive Eisen<cl... (AT) serendipita (DOT) com> wrote:
On 27/07/2010 16:08, Malc wrote:



sudo?

man sudoers

no passwords required

Ah promising - set up an alias and assign the command string to that
alias with NOPASSWD set...
Hmm - looks like the call to 'savegrp' is made from within the legato
executable; experimentation is in order then!
Hmnn

Well that means you will have to run legato sudo

As you still need to 'type' sudo savegrp
to make it happen even with sudoers

Other thoughts

1) suid
2) use sudoers and
binary edit the legato binary to get it to call say Savegrp
2a) where Legato is a script that execs sudo savegrp $@
or
2b) If your sysadmins don't like a script you can write a bit of C that
does the same

--
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.

Reply With Quote
  #9  
Old   
Clive Eisen
 
Posts: n/a

Default Re: ISM - run backups as a user other than root? - 07-27-2010 , 11:31 AM



On 27/07/2010 17:15, Clive Eisen wrote:
Quote:
On 27/07/2010 16:50, Malc wrote:
On Jul 27, 4:18 pm, Clive Eisen<cl... (AT) serendipita (DOT) com> wrote:
On 27/07/2010 16:08, Malc wrote:



sudo?

man sudoers

no passwords required

Ah promising - set up an alias and assign the command string to that
alias with NOPASSWD set...
Hmm - looks like the call to 'savegrp' is made from within the legato
executable; experimentation is in order then!
Hmnn

Well that means you will have to run legato sudo

As you still need to 'type' sudo savegrp
to make it happen even with sudoers

Other thoughts

1) suid
2) use sudoers and
binary edit the legato binary to get it to call say Savegrp
2a) where Legato is a script that execs sudo savegrp $@
or
2b) If your sysadmins don't like a script you can write a bit of C that
does the same
Sorry missed one
Put a script called savegrp EARLIER in your PATH that execs the real one
with sudo

That way you don't need to faf around editing legato
This will not work if the full path to savegrp is in legato





--
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.

Reply With Quote
  #10  
Old   
malc_p
 
Posts: n/a

Default Re: ISM - run backups as a user other than root? - 07-28-2010 , 10:47 AM



Bugger me I think it works; just ran an onbar backup of a couple of
dbspaces as user informix and got no errors.

I added the following entries to the '/opt/sudo/etc/sudoers/sudoers' file:

User_Alias IMIX=informix,dba

(at the end of the existing user aliases)

And:

IMIX ALL=(ALL) NOPASSWD:/opt/informix/bin/onbar

IMIX ALL=(ALL) NOPASSWD:/opt/informix/bin/savegrp

(In the "user privilege specification' section)

So it looks like the call to savegrp is covered.
Thanks for your help, Clive, appreciated!

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.