unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Jeff Bauer <jeffrubic@gmail.com>
To: Quiliro's lists <kiliro@riseup.net>
Cc: help-guix@gnu.org
Subject: Re: editing /etc/sudoers
Date: Sun, 16 Jun 2019 09:30:31 -0500	[thread overview]
Message-ID: <20190616143031.GD12459@serpent> (raw)
In-Reply-To: <e946838a415fc0e3e38efb1729ce4837@riseup.net>

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.

  parent reply	other threads:[~2019-06-16 14:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14 11:55 editing /etc/sudoers Jeff Bauer
2019-06-14 13:16 ` David Larsson
2019-06-14 13:21 ` Tobias Geerinckx-Rice
2019-06-14 13:58   ` Jeff Bauer
2019-06-16  2:27 ` Quiliro's lists
2019-06-16 14:18   ` Jeff Bauer
2019-06-16 14:30   ` Jeff Bauer [this message]
2019-06-16 23:08     ` Quiliro's lists
2019-06-16 23:20       ` Jeff Bauer
2019-06-17  7:17         ` Andreas Enge
2019-06-17 14:34           ` Quiliro's lists
2019-06-17 15:44             ` Jeff Bauer
2019-06-17 17:03               ` John Soo
2019-06-17 18:02                 ` Jeff Bauer
2019-06-17 20:16                   ` John Soo
2019-06-17  7:53         ` Hartmut Goebel
2019-06-17 15:48           ` Jeff Bauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190616143031.GD12459@serpent \
    --to=jeffrubic@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=kiliro@riseup.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).