[TriLUG] running script as mail alias, script running as specific user

suny at popmail.com suny at popmail.com
Wed Jan 16 16:13:00 EST 2002


Try scanning the sudo man page, it should mention
the use of a keyword for no password check as well
as running as any user.

The user simply prepend the 'sudo ' (with the space)
in front of the command they need to run.

Be careful, if you let folks run shell scripts as
root, make sure the scripts aren't read/write by
common folks and the script should set its own
environment variables (PATH, LD_LIBRARY_PATH...)
so hackers cant set their own env. variables then
have the script invoke their own commands (instead
of the ones intended by the script.)  Shell scripts
running under sudo should also hardcode full path
to the commands, i.e.:

   /sbin/lsmod [blah blah blah]

instead of just

   lsmod [blah blah blah]
Suny.


....................................
Get your own free email account from
http://www.popmail.com




More information about the TriLUG mailing list