4 ms·
What does visudo do that nano -w doesn't? I've never understood this properly.
by voltagex_ 13y ago
What does visudo do that nano -w doesn't? I've never understood this properly.
- vacri 13y agoLocks to only one editing user and confirms syntax is clean before saving. I'm not aware of nano enforcing correct sudoers syntax. Plus plenty of us don't like nano. man visudo for more info.
- throwaway2048 13y agovisudo, like vipasswd or crontab -e and other commands, respect the EDITOR environmental variable, so you can edit these files with whatever editor you prefer, while maintaining their protections.
- vacri 13y agoTrue. Provisioning a new test VM for me usually entails something like this: ssh in; visudo; wtf, this is nano! Boo!; ctrl-x; update-alternatives --config editor... :)
- e12e 13y agohttp://manpages.debian.net/cgi-bin/man.cgi?query=visudo http://manpages.debian.net/cgi-bin/man.cgi?query=visudo