avoid using sudo on the commandline
Brent Fortman
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:
/some/path/to/our/target/prog.
Brent
-----Original Message-----
From: Rick Weinbender [mailto:lsrwein at central-ph.k12.mo.us]
Sent: Wednesday, February 04, 2004 5:16 PM
To: sudo-users
Subject: avoid using sudo on the commandline
Hi,
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.
#!/bin/sh
exec /usr/bin/sudo /some/path/to/our/target/prog "$@"
Does that make sense?
Thanks for the help,
-Rick
____________________________________________________________
sudo-users mailing list <sudo-users at sudo.ws>
For list information, options, or to unsubscribe, visit:
http://www.sudo.ws/mailman/listinfo/sudo-users
More information about the sudo-users
mailing list