WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: visudo: no editor found  (Read 6884 times)

Offline bonbob

  • Jr. Member
  • **
  • Posts: 99
visudo: no editor found
« on: May 26, 2019, 01:11:06 PM »
Trying to use visudo on CorePure64 v.10, i catched this:

Code: [Select]
visudo: no editor found (editor path = /usr/bin/vi)
sure, it can be fixed by creating symlink

Code: [Select]
ln -s /bin/vi /usr/bin/vi
but maybe it will better fix in distro?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11594
Re: visudo: no editor found
« Reply #1 on: May 26, 2019, 02:26:24 PM »
Hi bonbob
You could add the following to your  sudoers  file:
Code: [Select]
Defaults editor=/usr/local/bin/editorReplace  /usr/local/bin/editor  with your choice of path and editor. Found here in case you want to read the rest of the thread:
http://forum.tinycorelinux.net/index.php/topic,15418.msg89421.html#msg89421

This was also reported here:
http://forum.tinycorelinux.net/index.php/topic,22711.msg142148.html#msg142148
and here:
http://forum.tinycorelinux.net/index.php/topic,21910.msg137105.html#msg137105

Offline bonbob

  • Jr. Member
  • **
  • Posts: 99
Re: visudo: no editor found
« Reply #2 on: May 26, 2019, 06:04:07 PM »
You could...

Sure i can. All of these topicstarters comes to one solution - make symlink from /bin/vi to /usr/bin/vi
And as visudo not working in CorePure out-of-the-box - it will not work untill someone not fix it once and for all

Offline PDP-8

  • Hero Member
  • *****
  • Posts: 915
Re: visudo: no editor found
« Reply #3 on: May 26, 2019, 06:22:32 PM »
Ah, ok cool that works for me with either vi or another editor of choice with either of the two above solutions.

I was struggling trying to follow that .profile and .ashrc editor fallback logic and found this golden oldie:

http://forum.tinycorelinux.net/index.php/topic,15337.msg88757.html#msg88757

Ok, I'm not going to touch the .ashrc fallback logic, but maybe we don't need that anymore with the two solutions of either linking vi or manually editing the sudoers file just once to enable your desired editor?

I'll look into crontab -e as well....
That's a UNIX book! - cool  -- Garth

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14801
Re: visudo: no editor found
« Reply #4 on: May 27, 2019, 01:52:53 AM »
After extensive searching of my "archives", I've found the sudo-1.7.8p1 source and can recompile visudo to approximately the same size pointing to /bin/vi - testing to follow...

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14801
Re: visudo: no editor found
« Reply #5 on: May 27, 2019, 03:37:24 AM »
correction made in 10.1beta1