Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Change of user in a script
Name: vicchai Date: June 19, 2005 at 07:25:45 Pacific OS: HPUX CPU/Ram: Nil
Comment:
Hi,
I am in root user running a script, this script need to execute some commands in oracle user, eg:
#Start of script ... (commands run in root user) ... su - oracle #change to oracle user (commands need to run in oracle user) ... ... #end of script
My problem is when this script execute till the "su - oracle" it will pause at there point, when I enter "exit" then it continue to execute the next command after the "su - oracle" in root user, so how can I execute those commands in oracle user? Thanks for any help.
Summary: When running the script below I get nothing.. I am a newbie with this. Not sure If you can run awk in a script. Also Im having problems getting a variable from the command line to the script. from com...
Summary: Hi all! Does anyone know how can I change user inside a script? I tried the su command, but I don't know how to insert the password within the script itself. I would appreciate any help. Thanks in adv...