execute shell script as another user
- From: Rich Glazier <rglazier2002@xxxxxxxxx>
- Date: Thu, 13 Dec 2007 11:29:36 -0800 (PST)
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
- Prev by Date: Administrivia: Tru64-UNIX-Managers information and policy statement
- Next by Date: ProC Problems on TRU64 V5.1B-4 with Oracle 10GR2
- Previous by thread: Administrivia: Tru64-UNIX-Managers information and policy statement
- Next by thread: ProC Problems on TRU64 V5.1B-4 with Oracle 10GR2
- Index(es):
Relevant Pages
|
|