Go to the FreeLists Home Page Home Signup Help Login
 



[oracle-l] || [Date Prev] [01-2006 Date Index] [Date Next] || [Thread Prev] [01-2006 Thread Index] [Thread Next]

Re: sudo in script -- automate with password

  • From: Jeff Herrick <jherrick@xxxxxxx>
  • To: "J. Dex" <cemail_219@xxxxxxxxxxx>
  • Date: Wed, 4 Jan 2006 16:13:12 -0500 (EST)

On Wed, 4 Jan 2006, J. Dex wrote:

> I have got a database script that mid-way through the script it needs to log
> in as sudo and run a process.  The problem is the sudo password.  I can't
> figure out a way to put it in the script instead of manually having to enter
> it.  Pulling the password from a password file doesn't seem to work either.
> Has anyone else found a solution to this or needed to do this?   The OS is
> AIX and it is Oracle 9202.  Is there a special syntax that needs to be used?
>

man sudo on my machine here (BSD) has a -S option to read from stdin
instead of the terminal. You could pop it into a file and redirect I
assume....haven't actually tried it myself

HTH

Jeff Herrick

--
http://www.freelists.org/webpage/oracle-l






[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.