CmndAlias
CmndAlias is a type of alias used in sudoers configuration to group and reference a set of allowed commands. It is defined with the Cmnd_Alias directive and helps administrators manage granular command permissions by name rather than by listing each command repeatedly.
In a sudoers file, a command alias is declared as Cmnd_Alias NAME = command1, command2, ... Each entry
Usage involves referencing the defined alias in a rule, allowing the specified users on specified hosts to
Cmnd_Alias WEB = /usr/bin/curl, /usr/bin/wget
Cmnd_Alias BACKUP = /bin/tar, /bin/cp
admin ALL=(root) NOPASSWD: BACKUP
CmndAlias enhances readability and maintainability of sudoers files, especially in environments with many commands or hosts.