The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
Running script from other user rather than login user rawatds Shell Programming and Scripting 3 01-30-2009 01:18 PM
How do i change to super user then revert back to ordinary user ,using shell script? wrapster Shell Programming and Scripting 3 06-04-2008 08:11 AM
Have script run as a different user mikey20 Shell Programming and Scripting 1 11-04-2005 02:12 PM
log out user in script whatisthis Shell Programming and Scripting 6 04-25-2005 02:26 PM
another user script omran UNIX for Advanced & Expert Users 7 10-05-2002 11:24 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-01-2007
Krishnaramjis Krishnaramjis is offline
Registered User
  
 

Join Date: Nov 2007
Posts: 15
Run the script from another user

Hello Experts
I want to run script from another user in unix . Also the script
has been calling from SQL. HOST command helps to call the unix file
from sql . But my problem is the unix script has to be run by
another user.
I tried tht following

$ sudo su - user2 -c who ==> it is asking password , but I couldn't
able to connect though I typed correct pwd.
Even I tried
$ /usr/local/bin/sudo -u user2 who --> it is asking password. I
couldn't able to connect though I typed correct password.

Please suggest me how to run the script from another user
without asking the password ( As I am planning for automation )

Thanks
Krishna
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:43 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0