[sudo-users] consultatio about edition for files

federico montaldo fmontaldo3 at gmail.com
Mon May 12 09:46:01 MDT 2014


Todd,

I modify the entri and I addedd the sudoedit. There is way that this
user can add files into the the path /opt/tivoli/tsm/client/ba/bin.
Also the only way that the user can edit is with the full path as you
sent me?.



On Mon, May 12, 2014 at 12:36 PM, Todd C. Miller
<Todd.Miller at courtesan.com> wrote:
> 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