Thread
:
How to use root within script/program?
View Single Post
mece
2011-03-01 , 08:19
Posts: 1,111 | Thanked: 1,985 times | Joined on Aug 2009 @ Åbo, Finland
#
7
without any modifications to sudoers and whatnot you can use run-standalone.sh like this:
sudo /usr/bin/run-standalone.sh /path/to/runthisscriptasroot.sh
That will run "runthisscriptasroot.sh" as root.
EDIT:
tested it with this script:
#!/bin/sh
whoami > whoami.txt
works
__________________
Class .. :
Meddler, Thread watcher, Developer, Helper
Humor .. : [
********--
] Alignment:
Pacifist
Patience : [
*****-----
] Weapon(s):
N900, N950, Metal music
Agro ... : [
----------
] Relic(s) :
N95, NGage, Tamyia Wild One
Try
Tweed Suit
for your hardcore twittering needs
http://twitter.com/mece66
I like my coffee black, like my metal.
Quote & Reply
|
The Following 5 Users Say Thank You to mece For This Useful Post:
AlMehdi
,
ejasmudar
,
figaro
,
gs1
,
ivyking
mece
View Public Profile
Send a private message to mece
Find all posts by mece