Take the 2-minute tour ×  How can I disable /usr/bin/mysql
command in sudoers file? I've tried to use it this way:
%tailonly ALL=!/usr/bin/mysql  But when I access user 'tailonly'
of group 'tailonly', this command is still enabled.  In short, I
only want that 'tailonly' user access tail -f /usr/app/*.log.
This is possible?   With this config, the user 'tailonly' still
can access mysql terminal with 'mysql' command:  $: sudo su  $:
visudo  Cmnd_Alias MYSQL = /usr/bin/mysql Cmnd_Alias
TAIL=/usr/bin/tail -f /jacad/jacad3/logs/*.log  # User privilege
specification root    ALL=(ALL:ALL) ALL  # Members of the admin
group may gain root privileges %admin ALL=(ALL) ALL  # Allow
members of group sudo to execute any command %sudo
ALL=(ALL:ALL) ALL %swa    ALL=/etc/init.d/jacad3 stop %swa
ALL=/etc/init.d/jacad3 start %swa    ALL=/etc/init.d/jacad3
restart %swa    ALL=sudoedit /jacad/jacad3/bin/jacad_start.sh
%tailonly ALL=ALL,!MYSQL share|improve this question  1 Answer 1
up vote 4 down vote accepted  I think su