SUMMARY: execute shell script as another user

Rich Glazier <[email protected]> Fri, 28 Dec 2007 10:20:12 -0800 (PST)
Newsgroups gmane.os.tru64.managers
Message-ID <[email protected]>
I got a lot of responses, and thanks to everyone who did.  Some of the suggestions included using except, sudo, and DOP in Tru64.

The below answer is all I needed to do.  I did a ssh-keygen -r rsa from the Oracle account on the Tru64 box.  It generated the keys.  then I copied the key in id_rsa.pub file, to the authorized_key file on the other server.  Then that Oracle user could ssh/scp to that other box with no logon prompt (ex:  oracle_user# ssh scpusert@other_system )


> If I am logged into my T64 box as scpuser, I can run the scp script that
> automatically logs into the other box as scpuser and copies the file.

Can't you just place the remote user's ssh key files in the local Oracle
home directory, so that when the oracle user runs the script and copies
the files to/from the remote host, it has the keys?


> My problem is that ultimately, scpuser wont be the one executing this
> script.  An Oracle account will call my script.  I'd rather not have the
> Oracle account be the one doing the SSH logins.

Why not?  How many people have the Oracle login?


gjvc


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.   http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping