tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* execute shell script as another user
@ 2007-12-13 19:29 Rich Glazier
  0 siblings, 0 replies; only message in thread
From: Rich Glazier @ 2007-12-13 19:29 UTC (permalink / raw)
  To: tru64-unix-managers

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-13 19:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-13 19:29 execute shell script as another user Rich Glazier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox