3

Lost visudo

I seem to have lost visudo, to my great surprise. I'm trying to add to /etc/sudoers or /etc/sudoers.d but when I try and run visudo as root I get this

sudo: visudo: command not found

when I search I get this

whereis visudo 
visudo: /usr/share/man/man8/visudo.8.gz

So the packed file is there but for some reason was either not unpacked or has been lost. sudo works fine.

If I try visudo as a command I get this

visudo 
The program 'visudo' can be found in the following packages: 
 * sudo 
 * sudo-ldap 
Try: sudo apt-get install <selected package>

I'm unsure if trying sudo apt-get install sudo will solve the problem or just give more problems.

user235365
  • 31
  • 1
  • 2
  • 3
    Please add the output of ls -l /usr/sbin/visudo and sudo sh -c 'echo $PATH' to your question. – Florian Diesch Jan 13 '14 at 20:37
  • 1
    /usr/share/man/man8/visudo.8.gz is not the packed file, it's the man page of the command. Your executable should be in /usr/sbin/visudo. Reinstalling sudo will probably remove your modifications to /etc/sudores (but should not touch files added under /etc/sudoers.d/). – Rmano Jan 13 '14 at 20:49

0 Answers0