Bug 269 - sudoers should point out why using visudo is a good idea
sudoers should point out why using visudo is a good idea
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Documentation
1.6.9
PC Linux
: low enhancement
Assigned To: Todd C. Miller
https://launchpad.net/bugs/11620
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-14 07:23 MST by Martin Pitt
Modified: 2007-11-15 11:18 MST (History)
0 users

See Also:


Attachments
improve comment about visudo in sudoers (501 bytes, patch)
2007-11-14 07:23 MST, Martin Pitt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Pitt 2007-11-14 07:23:47 MST
Created attachment 216 [details]
improve comment about visudo in sudoers

From the original Ubuntu bug:

  "There is a comment in the /etc/sudoers file that says that it MUST be edited with 'visudo'. It does not say WHY, and really should. I discovered the hard way that the reason is that 'visudo' performs sanity and syntax checks, preventing you from locking yourself out!

I think that the comments at the top of /etc/sudoers should make that clearer, so that foolish people like me don't lock themself out."

Admittedly he had that coming, but I think that a clearer comment cannot hurt. What do you think about attached patch?

Thanks,

Martin
Comment 1 Todd C. Miller 2007-11-14 15:18:31 MST
That seems a bit wordy, how about the following?

# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors        
# that prevent sudo from running.
Comment 2 Martin Pitt 2007-11-14 17:45:11 MST
Works for me. Thank you!
Comment 3 Todd C. Miller 2007-11-15 11:18:24 MST
I updated sudoers in cvs. The next release of sudo will include this wording.