avoid using sudo on the commandline
Brent.Fortman at radioshack.com
Thu Feb 5 08:36:26 EST 2004
This is a simple case of "wrapping" sudo in another script. Merely give
the wrapper a name - say "myscript" - and put the lines you mentioned
below in it (make it executable). You will of course then need to edit
the sudoers file and give the user proper access to execute:
From: Rick Weinbender [mailto:lsrwein at central-ph.k12.mo.us]
Sent: Wednesday, February 04, 2004 5:16 PM
Subject: avoid using sudo on the commandline
I'm trying to find a way for a regular user to run a bash script
(as root) from the commandline, without having to type the
word 'sudo' in front of the scriptname.
Is this possible?
I found a info clip from the web, but I can't get it to work.
exec /usr/bin/sudo /some/path/to/our/target/prog "$@"
Does that make sense?
Thanks for the help,
sudo-users mailing list <sudo-users at sudo.ws>
For list information, options, or to unsubscribe, visit:
More information about the sudo-users