you don't need sudo to do login with password and run commands.. sudo is more for a use without password.. like David said, set the sudoers file.. On 1/5/06, Johnson, George <GJohnson@xxxxxxx> wrote: > > > This is my tuppence worth and this may be a statement of the > "bleedin' obvious" as we say here, but doesn't this kind of defeat the > security purpose of sudo? Putting passwords in files should always be > avoided not only is it a security risk but supposing you are away for a week > or two, someone changes the password for the target account, next thing you > may have critical processes failing and no one understand why or where to > correct it. > > -----Original Message----- > From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] > On Behalf Of amit.poddar@xxxxxxxx > Sent: 04 Jan 2006 21:25 > To: cemail_219@xxxxxxxxxxx > Cc: oracle-l@xxxxxxxxxxxxx > Subject: Re: sudo in script -- automate with password > > > this works for me > > sudo -S ls -ltr << EOF > password > EOF > > > Quoting "J. Dex" <cemail_219@xxxxxxxxxxx>: > > > 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? > > > > _________________________________________________________________ > > Don't just search. Find. Check out the new MSN Search! > > http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > > > -- > > //www.freelists.org/webpage/oracle-l > > > > > > > -- > //www.freelists.org/webpage/oracle-l > > > > > **************************************************************************** > This message contains confidential information and is intended only > for the individual or entity named. If you are not the named addressee > you should not disseminate, distribute or copy this e-mail. > Please notify the sender immediately by e-mail if you have received > this e-mail by mistake and delete this e-mail from your system. > E-mail transmission cannot be guaranteed to be secure or error-free > as information could be intercepted, corrupted, lost, destroyed, arrive > late or incomplete, or contain viruses. The sender therefore does not > accept liability for any errors or omissions in the contents of this > message which arise as a result of e-mail transmission. > If verification is required please request a hard-copy version. > This message is provided for informational purposes and should not > be construed as an invitation or offer to buy or sell any securities or > related financial instruments. > GAM operates in many jurisdictions and is > regulated or licensed in those jurisdictions as required. > > **************************************************************************** > > -- > //www.freelists.org/webpage/oracle-l > > >