![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| 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 05:08 PM |
| login to different user completely within the script | yakdiver | Shell Programming and Scripting | 1 | 05-05-2005 02:08 PM |
| User Login Monitor Script | Drewser | Shell Programming and Scripting | 2 | 02-07-2005 04:45 PM |
| running a script under different user | Gary Dunn | Shell Programming and Scripting | 4 | 12-13-2004 06:17 PM |
| user login script question | termiEEE | UNIX for Dummies Questions & Answers | 2 | 02-03-2004 05:34 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
|
||||
|
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 " |
|
||||
|
su - normal_user << !
/normaluser/bin/x this works fine i have tried it .... |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|