![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I create user but i cant login the user i created. | jerome | UNIX for Dummies Questions & Answers | 5 | 06-09-2006 02:08 PM |
| login to different user completely within the script | yakdiver | Shell Programming and Scripting | 1 | 05-05-2005 11:08 AM |
| User Login Monitor Script | Drewser | Shell Programming and Scripting | 2 | 02-07-2005 01:45 PM |
| running a script under different user | Gary Dunn | Shell Programming and Scripting | 4 | 12-13-2004 03:17 PM |
| user login script question | termiEEE | UNIX for Dummies Questions & Answers | 2 | 02-03-2004 02:34 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Running script from other user rather than login user
Hi,
My requirement is that i am login from ROOT in a script but when any command is coming which is logging to sqlplus then i have to run it with normal user as only normal user have permission to connect to sqlplus . i tried making a script like this : #! /bin/ksh su - normal_user /normal_user/bin/x where x is the script which is doing all sort of database activity. but when i run it, it simply comes with normal_user prompt and doing nothing. Please assist me in this case. Thanks rawat |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
You could try remsh
|
|
#3
|
|||
|
|||
|
Hi, Not sure what your script is doing but try a "here-doc"
inside your original script and not run the /bin/x script? You can pass variables. ie su - user_name -c "VAR1=xxx; VAR2=abc; VAR3=${def}<< EOF Command 1 $VAR1 Command 2 $VAR2 Command 3 $VAR3 etc etc exit; EOF " |
|||
| Google The UNIX and Linux Forums |