On Thursday 07 September 2006 16:56, Roy Souther wrote:
> I think this is beyond the ability of SUDO but I need some solution.

it is quite within the ability of sudo.

> I need to be able to setup some way for a bash script to be run only by
> regular users without any arguments and run by root with specific
> arguments that are gathered when it is run by a regular user.

from `man sudoers`:

        Cmnd_List ::= Cmnd │
                      Cmnd ’,’ Cmnd_List

        commandname ::= filename │
                        filename args │
                        filename ’""’

        Cmnd ::= ’!’* commandname │
                 ’!’* directory │
                 ’!’* "sudoedit" │
                 ’!’* Cmnd_Alias

       A Cmnd_List is a list of one or more commandnames, directories, and 
other aliases.  A commandname is a fully qualified filename which may include 
shell-style wildcards (see the Wildcards section below).  A simple filename 
allows the user to run the command with any arguments he/she wishes.  
However, you may also specify command line arguments (including wildcards).  
Alternately, you can specify "" to indicate  that the command may only be run 
without command line arguments.  A directory is a fully qualified pathname 
ending in a ’/’.  When you specify a directory in a Cmnd_List, the user will 
be able to run any  file within that directory (but not in any subdirectories 
therein).

so you want: myscript ""

enjoy.

-- 
Aaron J. Seigo
Undulate Your Wantonness
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

Full time KDE developer sponsored by Trolltech (http://www.trolltech.com)

Attachment: pgpqebiGiLoaH.pgp
Description: PGP signature

_______________________________________________
clug-talk mailing list
[email protected]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying

Reply via email to