Description of problem: If you create a syntax error near the end of /etc/sudoers then visudo will say: >>> sudoers file: syntax error, line 95 <<< If you choose to edit the file it conveniently moves you to the specified line. Unfortunately the line number is wrong. Version-Release number of selected component (if applicable): sudo-1.6.9p4-3.fc8 How reproducible: Always Steps to Reproduce: 1. visudo 2. add a new line at the end, containing a syntax error 3. save and quit 4. choose to re-edit the file Actual results: Cursor is automatically placed on the wrong line. Expected results: Cursor should be on the line containing the syntax error. Additional info: This is caused by the following lines: Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \ LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \ LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \ LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \ _XKB_CHARSET XAUTHORITY" The escaped newlines confuse the line counter so that any syntax error after env_keep will report the wrong line number.
Using += allows you to break the lines up without confusing the line numbers: Defaults env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR" Defaults env_keep += "LS_COLORS MAIL PS1 PS2 QTDIR USERNAME" Defaults env_keep += "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION" Defaults env_keep += "LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC" Defaults env_keep += "LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS" Defaults env_keep += "_XKB_CHARSET XAUTHORITY" but I'll leave this bug open since the problem still exists
*** Bug 432395 has been marked as a duplicate of this bug. ***
sudo-1.6.9p4-4.fc8 has been submitted as an update for Fedora 8
sudo-1.6.9p4-4.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.