Skip to content

Instantly share code, notes, and snippets.

@Edison-Hsu
Last active August 23, 2017 10:41
Show Gist options
  • Save Edison-Hsu/b90acf5af30ee5217cb08f6535d5ed86 to your computer and use it in GitHub Desktop.
Save Edison-Hsu/b90acf5af30ee5217cb08f6535d5ed86 to your computer and use it in GitHub Desktop.
new user with sudo
# Use the adduser command to add a new user to your system.
adduser #{username}
# Use the usermod command to add the user to the sudo group.
usermod -aG sudo #{username}
# Test sudo access on new user account
su - #{username}
sudo ls -la /root
su - #{username}
mkdir ~/.ssh
touch authorized_keys
# add key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment