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
ssh - passing password in shell script Muktesh Shell Programming and Scripting 5 05-05-2009 12:37 PM
passing values from sql to shell script sachin.gangadha Shell Programming and Scripting 3 04-22-2008 11:11 PM
Passing argumnets from shell script to sql habuzahra Shell Programming and Scripting 1 10-24-2007 04:38 AM
passing two variables into a shell script? Bashar Shell Programming and Scripting 2 05-15-2007 10:00 AM
passing awk variable to the shell script bcheaib Shell Programming and Scripting 3 07-21-2004 10:00 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-18-2008
manojbarot1 manojbarot1 is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 1
passing password in shell script

Hi,

Anybody help to write a shell script as below requirement.

script stops some costomized application services.
1. first it will stop apache as root
2. then it will switch to my application user and stop app service.
Note: passing password is required to stop app service as app user.
I dont want it to prompt for password.
3 then exit from app user and move to another service to stop.

Please help me as soon as possible.

Thanks in advance
Manoj
  #2 (permalink)  
Old 11-18-2008
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2005
Location: Switzerland - GE
Posts: 1,546
1) Since your script will be launched by root, where you think you will have some issue?... in your script its just a su - appuser -c "command..." as you are root it will not prompt you for a passwd... Do you think it asks root the oracle passwd when restarting an instance after reboot?
Sponsored Links
Closed Thread

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 09:02 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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