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,gmane.spam.detected Subject: execute shell script as another user Date: Thu, 13 Dec 2007 11:29:36 -0800 (PST) Message-ID: <305948.69837.qm@web32204.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 1197574209 17105 80.91.229.12 (13 Dec 2007 19:30:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Dec 2007 19:30:09 +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 Thu Dec 13 20:30:20 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 1J2tlE-0007Ue-9x for gotm-tru64-unix-managers@gmane.org; Thu, 13 Dec 2007 20:30:20 +0100 Original-Received: (qmail 30277 invoked by uid 49509); 13 Dec 2007 19:29:47 -0000 Original-Sender: tru64-unix-managers-owner@ornl.gov Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 30267 invoked by uid 49501); 13 Dec 2007 19:29:47 -0000 Original-Received: from 160.91.4.119 by sws1 (envelope-from , uid 49491) with qmail-scanner-1.25 (clamdscan: 0.83/743. spamassassin: 3.0.2. Clear:RC:0(160.91.4.119):SA:0(-2.6/5.0):. Processed in 0.458726 secs); 13 Dec 2007 19:29:47 -0000 X-Spam-Status: No, hits=-2.6 required=5.0 Original-Received: from emroute1.ornl.gov (160.91.4.119) by sws1.ornl.gov with SMTP; 13 Dec 2007 19:29:46 -0000 Original-Received: from emroute1.ornl.gov ([127.0.0.1]) by emroute1.ornl.gov (PMDF V6.3-x14 #31501) with ESMTP id <0JT0009N865M7X@emroute1.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 13 Dec 2007 14:29:46 -0500 (EST) Original-Received: from CONVERSION-DAEMON.emroute1.ornl.gov by emroute1.ornl.gov (PMDF V6.3-x14 #31501) id <0JT00070165M9G@emroute1.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 13 Dec 2007 14:29:46 -0500 (EST) Original-Received: from VIRUSCAN-DAEMON.emroute1.ornl.gov by emroute1.ornl.gov (PMDF V6.3-x14 #31501) id <0JT00070265F99@emroute1.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 13 Dec 2007 14:29:46 -0500 (EST) Original-Received: from web32204.mail.mud.yahoo.com (web32204.mail.mud.yahoo.com [68.142.207.135]) by emroute1.ornl.gov (PMDF V6.3-x14 #31501) with SMTP id <0JT000MZO65CS4@emroute1.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 13 Dec 2007 14:29:39 -0500 (EST) Original-Received: (qmail 69859 invoked by uid 60001); Thu, 13 Dec 2007 19:29:36 +0000 Original-Received: from [65.114.238.246] by web32204.mail.mud.yahoo.com via HTTP; Thu, 13 Dec 2007 11:29:36 -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 spam2.ornl.gov X-Spam-Level: X-Qmail-Scanner-MOVED-X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,BOTNET_SERVERWORDS, DKIM_SIGNED autolearn=ham version=3.2.3 X-YMail-OSG: Nt0PPqQVM1kx4e6f.ytvd83eLYUMbD8fsA_kUSETVBL7A6BALbqzCg223BrNTdDisQ-- DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=3osZdTJlEtIS/8UUfF87e7WmLCYfFtr3xCkI/RXOZS6BQ2peFealJFdiyKaWYskNa3/Z7D5UkQ4+imzgiY1w3B02TH2Vvxd8+sVs6v2WbqhbY8WN9br0pWVG7sQbHRE69ZVoRstRCxekKzsXO7mzLFLImZ0aqchg2t4jbtHpxBc=; X-Spam-Report: 5.4 points; * 0.5 FROM_ENDS_IN_NUMS From: ends in numbers * 4.0 DCC_CHECK Listed in DCC (http://rhyolite.com/anti-spam/dcc/) * 0.4 DNS_FROM_RFC_ABUSE RBL: Envelope sender in abuse.rfc-ignorant.org * 0.5 DNS_FROM_RFC_WHOIS RBL: Envelope sender in whois.rfc-ignorant.org Xref: news.gmane.org gmane.os.tru64.managers:9256 gmane.spam.detected:2871167 Archived-At: sort of OT Here's the situation: I have a simple scp script (ksh) that copies a single file from one Tru64 machine to another, as a particular account. The keys have already been generated and placed in eachothers authorized_keys files for that particular user, so the scp executes with no login prompt, while logged in as that user. The scpuser account I created is a specific locked down account for just that secure copy. 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. 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. Is there a way for the shell script to drop to another user, or subshell as another user, or something like that? Just adding a "su - scpuser" to the script is going to prompt for a password. Thanks for the help. ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs