Skip to content

Instantly share code, notes, and snippets.

@LplusKira
Created March 4, 2019 09:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LplusKira/860d1b73acbfb8a5d9454d32f1f15da3 to your computer and use it in GitHub Desktop.
Save LplusKira/860d1b73acbfb8a5d9454d32f1f15da3 to your computer and use it in GitHub Desktop.
For ubuntu 16.04 add sudoer in current ssh login session
#!/bin/bash
## - Ref: https://www.digitalocean.com/community/tutorials/how-to-create-a-sudo-user-on-ubuntu-quickstart
echo "ONLY use this script on ubuntu 16.04 -- \"lay down butcher's knife, become a Buddha on the spot\""
# Adding ...
printf "Type to-be-created usr name: "
read username
echo ""
sudo adduser ${username}
sudo usermod -aG sudo ${username}
# TODO XXX
# validation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment