Tiny Core Linux

Tiny Core Base => TCB Bugs => Topic started by: bonbob on May 26, 2019, 01:11:06 PM

Title: visudo: no editor found
Post by: bonbob 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?
Title: Re: visudo: no editor found
Post by: Rich 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
Title: Re: visudo: no editor found
Post by: bonbob 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
Title: Re: visudo: no editor found
Post by: PDP-8 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....
Title: Re: visudo: no editor found
Post by: Juanito 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...
Title: Re: visudo: no editor found
Post by: Juanito on May 27, 2019, 03:37:24 AM
correction made in 10.1beta1