content: It's not so much /etc/sudoers fault, as that's a pretty secure file normally and can't be read/wrote to by anyone other than root.  I'll break it down for ya: echo 'echo "$(whoami) ALL=(ALL) NOPASSWD:ALL" >&3' |   All this thing does is echo "dev ALL=(ALL) NOPASSWD:ALL" to the third standard output and | pipes it to the next command. Nothing too exciting, right? The ugly part is where &3 is piped to: DYLD_PRINT_TO_FILE=/etc/sudoers newgrp  newgrp has to execute as root since it changes the group permissions of the shell, but by itself it's pretty secure. The problem is the new environment variable included with Yosemite, DYLD_PRINT_TO_FILE, which takes anything from &3 and is supposed to be used to log it to a file. Since newgrp has to be run as root and takes enviroment variables, it lets DYLD_PRINT_TO_FILE print out to any file that root as access to, so pretty much any file on the system. Using this, it outputs "dev ALL=(ALL) NOPASSWD:ALL" to /etc/sudoers, which gives the user "dev" access to the sudo command without a password. All that's left is ; sudo -s  which just executes a shell with root permissions after newgrp is done. A very elegant finishing touch, if you ask me.