Bugzilla – Bug 734
visudo locks user out on second attempt
Last modified: 2016-02-12 12:09:02 MST
I made a mistake in visudo, so it asked me what to do. I chose "e" and then MADE NO CHANGES. Upon exiting the editor, it went back to the shell, effectively locking me out, instead of telling me it was still borken: [revragnarok@machine jenkins]$ sudo visudo [sudo] password for revragnarok: Your password will expire in 3 day(s). visudo: >>> /etc/sudoers: syntax error near line 113 <<< 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!) What now? e [revragnarok@machine jenkins]$ sudo visudo sudo: >>> /etc/sudoers: syntax error near line 113 <<< sudo: parse error in /etc/sudoers near line 113 revragnarok is not allowed to run sudo on machine. This incident will be reported. == Version info == [revragnarok@machine jenkins]$ rpm -q --whatprovides $(which visudo) sudo-1.8.6p7-13.el7.x86_64 [revragnarok@machine jenkins]$ cat /etc/redhat-release CentOS Linux release 7.1.1503 (Core)
I can only reproduce this bug with RedHat/Centos sudo package. The bug is not present when I build from source or use the package from www.sudo.ws. It is likely that this bug was introduced by one of the RedHat patches to sudo. You may wish to open a bug report with RedHat instead.
Filed: https://bugs.centos.org/view.php?id=10361 Thanks for the quick feedback!