[sudo-users] consultatio about edition for files

Todd C. Miller Todd.Miller at courtesan.com
Mon May 12 09:36:17 MDT 2014

On Mon, 12 May 2014 12:20:49 -0300, federico montaldo wrote:

> HI todd,
> Thanks for your repply. If i put this entries in sudo:
> Cmnd_Alias ADMBKUP  /usr/bin/dsmc,\
> /bin/vi /opt/tivoli/tsm/client/ba/bin/dsm.sys,\
> /bin/vi /opt/tivoli/tsm/client/ba/bin/dsm.opt,\
> /bin/vi /tsmlogs/logs/dsmerror.log,\
> /bin/vi /tsmlogs/logs/dsmsched.log,\
> /sbin/initctl start dsm-sched
> But when I want to add the line as an example that you passme. Sudo
> reply with an error in the first line of the Cmnd_Alias.

You are missing an equal sign after the ADMBKUP.  That alias using
sudoedit would be:

Cmnd_Alias ADMBKUP = /usr/bin/dsmc,\
    sudoedit /opt/tivoli/tsm/client/ba/bin/dsm.sys,\
    sudoedit /opt/tivoli/tsm/client/ba/bin/dsm.opt,\
    sudoedit /tsmlogs/logs/dsmerror.log,\
    sudoedit /tsmlogs/logs/dsmsched.log,\
    /sbin/initctl start dsm-sched

which allows the user to do:

$ sudoedit /opt/tivoli/tsm/client/ba/bin/dsm.opt

or, if you prefer:

$ sudo -e /opt/tivoli/tsm/client/ba/bin/dsm.opt

since sudoedit is the same as "sudo -e".

 - todd

More information about the sudo-users mailing list