execute shell script as another user



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



Relevant Pages

  • execute shell script as another user
    ... I have a simple scp script that copies a single file from one ... machine to another, as a particular account. ... If I am logged into my box as scpuser, I can run the scp script that ...
    (alt.os.linux)
  • Re: Entourage account setup applescript not working
    ... I pasted the script at the end just in case. ... When comparing the account settings on 2 computers, ... This script assists a user with the setup of his Exchange account ... Customize the network and server properties below with information ...
    (microsoft.public.mac.office.entourage)
  • Re: Error 15401 using sp_grantlogin (not addressed by current KB articles)
    ... Restarting Windows 2000 resolved the problem for this particular account, ... confused when it sees a duplicate SID. ... > One way to get SQL Server to agree with the renamed NT ... > Preview (to ensure the script was created), ...
    (microsoft.public.sqlserver.security)
  • RE: Error 15401 using sp_grantlogin (not addressed by current KB articles)
    ... argument to get_sid, it returns a sid. ... The sysxlogins.name column stores the NT account ... One way to get SQL Server to agree with the renamed NT ... check "Script all objects", on the Formatting tab UNcheck "Generate the ...
    (microsoft.public.sqlserver.security)
  • Re: How to change default of "Add to Address Book" command
    ... Script Editor, I did access the group using Google simply because my ... even though the Entourage source for my message clearly says ... Exchange account's Contacts address book. ... If you happen to have more than one Exchange account then ...
    (microsoft.public.mac.office.entourage)