Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #198783
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Newsgroups | linux.debian.user |
| Subject | Re: /etc/alternatives feedback for presentation |
| Date | 2018-08-14 17:40 +0200 |
| Message-ID | <wmJAm-4mp-9@gated-at.bofh.it> (permalink) |
| References | <wkZpU-7Yo-13@gated-at.bofh.it> <wlKyt-22b-1@gated-at.bofh.it> <wmkLE-6Ct-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon 13 Aug 2018 at 09:08:28 (-0400), Greg Wooledge wrote: > On Sat, Aug 11, 2018 at 05:28:37PM -0500, Ryan Nowakowski wrote: > > For example if I set the EDITOR env var how does > > that interact with update-alternatives when I run visudo? > > The VISUAL or EDITOR variable takes precedence, if one of them is set. > If neither one is set, then visudo uses its compiled-in default, which > on Debian happens to be '/usr/bin/editor'. > > The problem is that sometimes, sudo will strip environment variables, > and sometimes, it will not. So, on any given computer with any given > sudoers configuration, you can't actually know in advance whether > "sudo visudo" will use VISUAL/EDITOR or not. > > Isn't Unix *fun*? > > Of course, if you simply use "su", then VISUAL/EDITOR will be preserved > in the environment (because "su" does not strip environment variables), > so "su" followed by "visudo" should work fine. > > But, wait! Debian has decided to CHANGE HOW SU WORKS in testing, so > after stretch, who knows how things will work?! > > Some people claim you should muscle-memorize "su -" which strips the > environment in order to give you a usable PATH variable. If you follow > THIS advice, then "su -" will strip VISUAL/EDITOR from the environment, > and then your VISUAL/EDITOR variables won't work when you type visudo. > So, I can't imagine why you would want to do that. Losing all your > qualify-of-life environment variables is far too high a price to pay to > get a working PATH variable after su. > > The other alternatives are: > > 1) Stay on stretch. > 2) Edit /etc/login.defs to restore a functional su command (without needing > to use "su -"). > 3) Put /usr/sbin and /sbin in your ordinary account's PATH. > > *Fun*! Why is Put some "qualify-of-life environment variables" into /root/.bashrc not in your list? Cheers, David.
Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
/etc/alternatives feedback for presentation "der.hans" <deb-user@LuftHans.com> - 2018-08-09 22:10 +0200
Re: /etc/alternatives feedback for presentation Ryan Nowakowski <tubaman@fattuba.com> - 2018-08-12 00:30 +0200
Re: /etc/alternatives feedback for presentation Greg Wooledge <wooledg@eeg.ccf.org> - 2018-08-13 15:10 +0200
Re: /etc/alternatives feedback for presentation David Wright <deblis@lionunicorn.co.uk> - 2018-08-14 17:40 +0200
Re: /etc/alternatives feedback for presentation Greg Wooledge <wooledg@eeg.ccf.org> - 2018-08-14 17:50 +0200
Re: /etc/alternatives feedback for presentation "der.hans" <deb-user@LuftHans.com> - 2018-08-24 04:30 +0200
Re: /etc/alternatives feedback for presentation Greg Wooledge <wooledg@eeg.ccf.org> - 2018-08-24 14:20 +0200
Re: /etc/alternatives feedback for presentation "der.hans" <deb-user@LuftHans.com> - 2018-08-17 04:40 +0200
csiph-web