-
-
Save naviat/fb437b35434777f86caa772c7bf49e24 to your computer and use it in GitHub Desktop.
Add the current user to the sudoers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "$1" ] ; then userid=$(whoami); else userid=$1; fi | |
sudo tee /etc/sudoers.d/${userid} > /dev/null <<EOF | |
${userid} ALL=(root) NOPASSWD:ALL | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment