Re: vipw and vigr default editor
- Date: Fri, 5 Jan 2018 15:15:35 -0500
- From: Greg Wooledge <wooledg@xxxxxxxxxxx>
- Subject: Re: vipw and vigr default editor
On Fri, Jan 05, 2018 at 03:00:43PM -0500, John Ratliff wrote:
> I have to do
> sudo EDITOR=vim vipw
> How can I make vim the default editor for vipw/vigr. Or how can I set the
> EDITOR variable when I use sudo automatically?
By default, sudo strips all the useful variables out of your environment.
If you want it to *keep* your environment, you need to change the
/etc/sudoers file (with "sudo EDITOR=whatever visudo"). One way to do
where "greg" is the username who is trusted to set environment vars.