From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rich Glazier Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: execute shell script as another user Date: Fri, 28 Dec 2007 10:20:12 -0800 (PST) Message-ID: <767643.55613.qm@web32214.mail.mud.yahoo.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1198866050 23154 80.91.229.12 (28 Dec 2007 18:20:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Dec 2007 18:20:50 +0000 (UTC) To: tru64-unix-managers@ornl.gov Original-X-From: tru64-unix-managers-owner-gotm-tru64-unix-managers=m.gmane.org@sws1.ctd.ornl.gov Fri Dec 28 19:21:04 2007 Return-path: Envelope-to: gotm-tru64-unix-managers@gmane.org Original-Received: from sws1.ornl.gov ([160.91.1.101]) by lo.gmane.org with smtp (Exim 4.50) id 1J8JpP-0003nm-Iw for gotm-tru64-unix-managers@gmane.org; Fri, 28 Dec 2007 19:21:03 +0100 Original-Received: (qmail 16536 invoked by uid 49509); 28 Dec 2007 18:20:27 -0000 Original-Sender: tru64-unix-managers-owner@ornl.gov Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 16513 invoked from network); 28 Dec 2007 18:20:27 -0000 Original-Received: from emroute4.ornl.gov (160.91.86.27) by sws1.ornl.gov with SMTP; 28 Dec 2007 18:20:27 -0000 Original-Received: from emroute4.ornl.gov ([127.0.0.1]) by emroute4.ornl.gov (PMDF V6.3-x14 #31501) with ESMTP id <0JTR00LLWUY3R9@emroute4.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Fri, 28 Dec 2007 13:20:27 -0500 (EST) Original-Received: from CONVERSION-DAEMON.emroute4.ornl.gov by emroute4.ornl.gov (PMDF V6.3-x14 #31501) id <0JTR00101UY3UB@emroute4.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Fri, 28 Dec 2007 13:20:27 -0500 (EST) Original-Received: from VIRUSCAN-DAEMON.emroute4.ornl.gov by emroute4.ornl.gov (PMDF V6.3-x14 #31501) id <0JTR00102UXRTN@emroute4.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Fri, 28 Dec 2007 13:20:27 -0500 (EST) Original-Received: from web32214.mail.mud.yahoo.com (web32214.mail.mud.yahoo.com [68.142.207.145]) by emroute4.ornl.gov (PMDF V6.3-x14 #31501) with SMTP id <0JTR001E9UXQ5C@emroute4.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Fri, 28 Dec 2007 13:20:15 -0500 (EST) Original-Received: (qmail 56554 invoked by uid 60001); Fri, 28 Dec 2007 18:20:13 +0000 Original-Received: from [65.114.238.246] by web32214.mail.mud.yahoo.com via HTTP; Fri, 28 Dec 2007 10:20:12 -0800 (PST) X-Envelope-from: rglazier2002@yahoo.com X-Mailer: YahooMailRC/818.31 YahooMailWebService/0.7.158.1 X-Spam-Virus: No X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on spam3.ornl.gov X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,BOTNET_SERVERWORDS, DKIM_SIGNED autolearn=ham version=3.2.3 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=WNAy0LbM++ObM3Zal6muIa8gNFVNem5Gkp051ZoZEWMmHjryCPMqYHNZ7I+WYxWmwqENUHA+qESd9ASLp3kGPozckg6DUSP9WgpqSjR5DIKkynzw8QDr3+6zjLHK6PBT0Bx1mVzQvXGMLTdu1+3gS4TDBh0LJtD3xPgID+48blw=; Xref: news.gmane.org gmane.os.tru64.managers:9258 Archived-At: 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