From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Bauer Subject: Re: editing /etc/sudoers Date: Sun, 16 Jun 2019 09:18:29 -0500 Message-ID: <20190616141829.GB12459@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]:34078) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcW2h-0008CP-2M for help-guix@gnu.org; Sun, 16 Jun 2019 10:22:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcVzP-00031u-D4 for help-guix@gnu.org; Sun, 16 Jun 2019 10:18:37 -0400 Received: from mail-yw1-xc32.google.com ([2607:f8b0:4864:20::c32]:39780) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hcVzO-0002zo-4r for help-guix@gnu.org; Sun, 16 Jun 2019 10:18:34 -0400 Received: by mail-yw1-xc32.google.com with SMTP id u134so3698405ywf.6 for ; Sun, 16 Jun 2019 07:18:33 -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.