Roger Bell_West writes:
> On 2017-08-04, Martin Gregorie wrote:
(about visudo)
>>Despite its name, which implies that it will use vi as its editor, the
>>Raspbian visudo seems to have been hacked and/or reconfigured to use
>>nano. At least, that is the case on my RPi.
>
> Like any well-written unix program, it will use whatever you've set up
> as the default editor.
Not exactly; see the man page. It has a built-in list of permitted
editors.
The reason is that sudo supports the idea of authorizing users to run
only a limited set of commands, and honoring arbitrary values of $EDITOR
would undermine that.
I’ve never thought this a very sensible feature (due to the substantial
risk that one of the permitted commands will allow privilege
escalation), but it is part of the design nevertheless.
--
http://www.greenend.org.uk/rjk/
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|