sudo and environment variables



Hi all,

I'm fairly new to the AIX world and am looking to set up a script to
have operators run some commands. These aren't OS level commands that
need root privs, they're SAP database backup commands but we don't want
them to have sap admin userid access.

I have it set up so that it runs as the dbadmin user but it complains
about libraries and other files missing. If I run the same thing with
an su, it seems to work as it inherits the environment of the "target"
user.

Can I do the same thing in sudo? So that when the ops run the script,
it calls the backup script as the dbadmin user with all of it's
environment variables defined?

Thanks,

Kevin

.



Relevant Pages

  • =?ISO-8859-1?Q?New_System_Command_Script_Facility?=
    ... I'm currently finished writing a new replacement command script processor ... (at least that RACF thinks so, and better support for non-RACF sites). ... The IF-type commands now have ELSE processing ... non-scroll highlighted console message and BEEP until a specific JOB or TASK ...
    (bit.listserv.ibm-main)
  • Re: sudo and environment variables
    ... I'm fairly new to the AIX world and am looking to set up a script to ... have operators run some commands. ... I have it set up so that it runs as the dbadmin user but it complains ... it seems to work as it inherits the environment of the "target" ...
    (comp.unix.aix)
  • Re: Command Line Interface
    ... >> should accept system commands only for an administrator. ... >> how should I supress the bash shell and launch my custom CLI ... > The script could run in a restricted shell and offer a menu of ... account, and either 1) change account password, 2) ...
    (comp.os.linux.misc)
  • Net::Telnet and SMTP
    ... I'm trying to send a sequence of commands and then log both the ... I've included the script and a sample text file (that feeds the scripts ... sub processfile { ... #Try a short delay between sending command and reading output ...
    (comp.lang.perl.misc)
  • Re: [opensuse] Need some help with a script
    ... Need some help with a script ... arcane and tortured hypothetical scenarios beggar belief. ... Without dot in path, they can't. ... generally ensures somehow that the various commands ...
    (SuSE)