How do I install sudo insults† on Mac terminal?
Apparently Apple has cleaned it up from Darwin, so adding Defaults insults
through sudo visudo
does not help.
† The insulting things sudo command says when you enter wrong password.
darwinmacbook prosudoterminal
How do I install sudo insults† on Mac terminal?
Apparently Apple has cleaned it up from Darwin, so adding Defaults insults
through sudo visudo
does not help.
† The insulting things sudo command says when you enter wrong password.
Best Answer
To install a sudo with insults you have to compile it yourself:
Requirements: Xcode 8.0, Sierra 10.12, probably SIP disabled
Backup sudo and visudo:
mkdir sudo
cd sudo
Curl the Apple open source sudo:
cd to the source folder:
configure, make and make install it:
The file sudo-83/src/INSTALL contains a lot more tweak options for the configure command!
The files may be installed to /usr/local/bin/ and /usr/local/sbin/ so you may have to move them (in my case I had to):
or modify your path and prepend /usr/local/bin and /usr/local/sbin.
Enter
/usr/bin/sudo /usr/sbin/visudo
Add the line in insert mode (simply hit i)
Save the file after hitting esc with
:wq!
.Results:
The files may be overwritten after a system update/upgrade!
Recompiling sudo with insults also works in older systems - you have to choose the respective tarball though (e.g. sudo-73.tar.gz should work with 10.9 and 10.10).
By modifying the ins_*.h in the src folder you should be able to include more insults. You can also add additional ins_*.h files but then you have to include them in insults.h like the other four already are. You may also include non-english insults of course!