Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: visudo config!, where to config visudo< Next Oldest | Next Newest >
antonino Offline





Group: Members
Posts: 48
Joined: Sep. 2006
Posted: Sep. 22 2006,07:57 QUOTE

Hi all,

After having edited sudoers with vi I found out this is a big nono, it should be doen with visudo!
Alas sudo visudo tells me
Code Sample
visudo: no editor found (editor path = /usr/bin/editor)

Does anyone know where to find the visudo config?

Thanks in advance!
Back to top
Profile PM WEB 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Sep. 22 2006,13:37 QUOTE

ln -s vi /usr/bin/editor
If you put editor in a different directory, use the path to vi

You might instead be able to set the editor with the EDITOR environment variable.


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
antonino Offline





Group: Members
Posts: 48
Joined: Sep. 2006
Posted: Sep. 23 2006,09:54 QUOTE

Hmm, I think I am missing something...
I don't have the foggiest where visudo is 'told' to look at /usr/bin/editor (vi resides in the same dir /usr/bin).
I put
Code Sample
EDITOR=vi
export EDITOR

in /ect/bashrc, but alas no change...
Back to top
Profile PM WEB 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Sep. 23 2006,11:21 QUOTE

Yeah, the EDITOR variable was just a guess.  I've never used visudo in DSL, and my other systems were already set up to use it properly.

Anyway, this is from the visudo man page:
Quote
      There is a hard-coded list of editors that visudo will use set at
      compile-time that may be overridden via the editor sudoers Default
      variable.  This list defaults to the path to vi(1) on your system,
      as determined by the configure script.  Normally, visudo does not
      honor the EDITOR or VISUAL environment variables unless they contain
      an editor in the aforementioned editors list.  However, if visudo is
      configured with the --with-enveditor flag or the enveditor Default
      variable is set in sudoers, visudo will use any the editor defines
      by EDITOR or VISUAL.  Note that this can be a security hole since it
      allows the user to execute any program they wish simply by setting
      EDITOR or VISUAL.

I have no idea how visudo was compiled for Knoppix/DSL, but my guess is support for the EDITOR variable was not enabled.  In any case, visudo obviously is looking for an application called "/usr/bin/editor", so making the symlink i mentioned in the first post should work:
ln -s vi /usr/bin/editor


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
antonino Offline





Group: Members
Posts: 48
Joined: Sep. 2006
Posted: Sep. 23 2006,15:20 QUOTE

EXCUSE ME! I misread your symlink command...
I put it in /etc/bashrc and everything works fine.

Thanks ever so much.
Back to top
Profile PM WEB 
4 replies since Sep. 22 2006,07:57 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: visudo config!

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code