How to handle special characters in /etc/sudoers file ?
Issue
-
/etc/sudoersfile does not accept special characters such as:!,=,:,,,(,),\in/etc/sudoersconfiguration file. -
For example, below
/etc/sudoersconfiguration entry gives a syntax error while modifying it withvisudoadmin ALL=(ALL) NOPASSWD: /path/to/app IsAlive module\:All instance:iv1 -
Expected error in case of special character usage without escape.
visudo >>> /etc/sudoers: syntax error near line 114 <<< What now? Options are: (e)dit sudoers file again e(x)it without saving changes to sudoers file (Q)uit and save changes to sudoers file (DANGER!)
Environment
- Red Hat Enterprise Linux (RHEL): All supported versions.
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.