Pregunta

Así que ... accidentalmente abrí visudo escribiendo

vi visudo

y, al mismo tiempo, también prefiero nano, así que solo presioné naturalmente Ctrl + X para salir, luego no me di cuenta de que estaba en VI (sí, soy lento jaja) y seguí intentando: P ... De todos modos, finalmente me di cuenta y no he usado VI en un tiempo, así que pensé que: X saldría sin ahorrar, pero supongo que ese no es el caso y ahora, cuando intento visudar, me consigo

-bash: /usr/sbin/visudo: cannot execute binary file

¿Alguna idea de lo que puedo hacer para arreglar esto?El archivo real / etc / sudoers está bien, puedo abrirlo y se ve normal, no veo nada de malo en él.Así que supongo que es solo el archivo visudo.¿Puedo reemplazarlo o algo?

Oh, y utilizando Ubuntu 8.04 (Hardy)

¿Fue útil?

Solución

visudo just a binary file with no built-in configurations, so you can safely replace it. Is included in the sudo package, which you can reinstall by typing:

sudo apt-get install --reinstall sudo

And if you're inclined to learn how to use the editor you stumbled onto, try typing

vimtutor

If all you care to know is how to exit vi / vim without breaking anything, the way to do is to type :q!

Otros consejos

You can launch visudo simply by typing visudo. If you type vi visudo, then you are trying to edit visudo with vi, which I hope is not what you are intending to do. Visudo is meant for editing certain configuration files in a safe manner. If you edit the files with an ordinary editor, you might might make mistakes and screw up the settings in an unrecoverable state. Use visudo to edit files like sudoers.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top