visudo does not use sensible-editor

Bug #280877 reported by Peter Matulis
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
debianutils (Ubuntu)
Invalid
Undecided
Unassigned
sudo (Ubuntu)
Invalid
Wishlist
Unassigned

Bug Description

Binary package hint: debianutils

Installed Intrepid Beta and issued the following command:

$ sudo visudo

I was brought immediately into a nano session.

Revision history for this message
Peter Matulis (petermatulis) wrote :

The installation was the Ubuntu Server edition.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Hi Peter-

I don't quite understand this bug.

sensible-editor is most certainly in Intrepid, and is provided by the debianutils package.

visudo is located at /usr/sbin/visudo, and is provided by the sudo package. Looking at the source, visudo doesn't support 'sensible-editor'. It does respect the EDITOR and VISUAL environment variables, if those are set in your environment. The only way I could get 'visudo' to use a nano editor was to first export EDITOR=/usr/bin/nano.

Please check the value of $EDITOR, when you're seeing this problem.

I'm going to mark this as "Invalid" against debianutils. If, instead, what you want is for visudo to support sensible-editor, that seems reasonable. Add a new task for this bug against the sudo package.

:-Dustin

Changed in debianutils:
status: New → Invalid
Revision history for this message
Peter Matulis (petermatulis) wrote :

OK then, visudo does not support sensible-editor. Thanks.

Changed in sudo:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Jani Uusitalo (uusijani) wrote :

The community wiki currently claims that the default editor for visudo has been sensible-editor since 8.10 [1]. But for me in both 12.04 and 14.04, `sudo visudo` still launches /etc/alternatives/editor, so select-editor doesn't actually change visudo's editor; for that I have to run `sudo update-alternatives --config editor`. So I suspect that either the wiki has incorrect advice, or this bug has been fixed, and has since reappeared.

* [1] https://help.ubuntu.com/community/Sudoers?action=recall&rev=25#content

Revision history for this message
dino99 (9d9) wrote :

outdated flavor, report about a newer active version if needed

Changed in sudo (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.