How to handle special characters in /etc/sudoers file ?
Issue
-
/etc/sudoersfile does not accept special character such as:*,?,[,],:in/etc/sudoersconfiguration file. -
For example, below
/etc/sudoersconfiguration entry gives 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 of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
