From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Bauer Subject: Re: editing /etc/sudoers Date: Sun, 16 Jun 2019 09:30:31 -0500 Message-ID: <20190616143031.GD12459@serpent> References: <20190614115539.GA22815@serpent> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:36914) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcWB4-0006Yu-O7 for help-guix@gnu.org; Sun, 16 Jun 2019 10:30:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcWB3-0003cE-Jk for help-guix@gnu.org; Sun, 16 Jun 2019 10:30:38 -0400 Received: from mail-yb1-xb29.google.com ([2607:f8b0:4864:20::b29]:35190) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hcWB3-0003YZ-F4 for help-guix@gnu.org; Sun, 16 Jun 2019 10:30:37 -0400 Received: by mail-yb1-xb29.google.com with SMTP id v17so3352203ybm.2 for ; Sun, 16 Jun 2019 07:30:34 -0700 (PDT) Content-Disposition: inline In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Quiliro's lists Cc: help-guix@gnu.org On Sat, Jun 15, 2019 at 07:27:57PM -0700, Quiliro's lists wrote: > Regarding the EDITOR variable, if Guix is the installer of the needed > editor it is the only situation when this regards to Guix. > > Would you please clarify your issue? Issue clarified up-thread: https://lists.gnu.org/archive/html/help-guix/2019-06/msg00140.html Generally, assigning the environment variable EDITOR works for visudo(*), but it appears /usr/bin/vi is hard-coded in guix's visudo as it does not acknowledge EDITOR. $ EDITOR=vim visudo ~/etc/guix/sudoers visudo: no editor found (editor path = /usr/bin/vi) David Larsson suggested using SUDO_EDITOR, however that doesn't work either: $ SUDO_EDITOR=vim visudo ~/etc/guix/sudoers visudo: no editor found (editor path = /usr/bin/vi) I'll still use visudo to check my local sudoers file on the command line, though it's more challenging to remember to check it (and the consequences of borking sudoers are severe). $ visudo --check -f ~/etc/guix/sudoers ~/etc/guix/sudoers: parsed OK I'm guessing /usr/bin/vi has been hard coded into visudo for security reasons, but it doesn't make sense if the /usr/bin/vi editor doesn't exist on Guix System. -Jeff ---- (*) Or at least it has on other system distros where nano was the default editor.