Comment 6 for bug 207369

Revision history for this message
Constantine Evans (cevans) wrote :

It's certainly an unfortunate default, and I had hoped it would be brought up elsewhere, as, at least at one time, I seem to recall that these sorts of issues weren't handled in bugs, especially for issues involving confusing behaviour and vi.

One option would be to undo the changes made for the Debian bug, making visudo use editor rather than vi once again, and then change the documentation, which seems mainly to consist of the man page. For consistency, however, it appears we would need to change vigr and vipw as well.

Another would be to create a command edit_sudoers (and presumably edit_passwd and edit_group as well), which would use editor/$EDITOR instead (the latter is made more difficult, of course, by the env_reset default of sudo); this would allow Ubuntu to have commands for editing these files that would be usable by most cli users, while at the same time not making the behaviour of the vi{sudo,pw,gr} commands unexpected for those experienced with other systems.

I don't quite understand why visudo is so restrictive about the editor anyway.