[sudo-users] Syntax of Cmnd_List

Jonathan Villa jvilla at innovativesource.net
Thu May 12 10:56:32 EDT 2005


I'm trying to give sudo access to a shell script that does only 2 things...

cp and mv

I've tried looking into using the following from the sudoers man
******************************************
Cmnd_List ::= Cmnd │
                      Cmnd ’,’ Cmnd_List

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

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

I'm not quite getting it...

Do I list the command and give it an alias then list it?

e.g.?

Cmnd_List = cpf, mvf

cpf = /bin/cp /home/location/* /home/location2/
mvf = /bin/mv /home/location/* /home/location3/


or have I totally misunderstood something?


-- 
Jonathan




More information about the sudo-users mailing list