![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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 |
| Display Modes | Rate This Thread |
|
|