The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
verify sudo password mdpalow Shell Programming and Scripting 0 12-20-2007 10:53 PM
Can give the input to prompt using shell script Vaibhav Agarwal Shell Programming and Scripting 2 11-01-2007 03:26 AM
sudo, root password penguin-friend Linux 5 11-02-2005 03:27 AM
script to change shell and prompt SHYAM Shell Programming and Scripting 1 06-27-2004 09:46 AM
rcp without password prompt scottl UNIX for Dummies Questions & Answers 1 09-15-2003 08:47 AM

 
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 07-26-2005
Brad_GNET Brad_GNET is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 1
sudo in OS X shell script without password prompt??

I've written a shell script to alter a particular preference file on OS X (10.3.9), which works fine (tested by running the script from the terminal sat in front of the box).

Problem is, I now have to run this script remotely across a number of machines via remote desktop, so where I've used the sudo command within the script I now have to do so without any prompt for a password.

I'm trialling the method...


Code:
echo "PASSWORD" | sudo -S somecommand

which as far as my understanding goes should work? I'm not having much luck with it, though.
(Yes, I am aware of the security implications of having a password saved in plain text. The script will be rolled out, executed, then deleted.)

I've also tried chowning the file as root and chmoding the file as 4755, but also no luck there.

What I'm basically trying to do is change user to another account persistent across all machines (our standard, installed admin account) and then run several commands as a super user and do this without any prompt for passwords.
Any help very much appreciated...
 

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 12:24 AM.


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