Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save parallaxhub/fe2d4caafc55d1ef9ca819aec464e5be to your computer and use it in GitHub Desktop.
Save parallaxhub/fe2d4caafc55d1ef9ca819aec464e5be to your computer and use it in GitHub Desktop.
Create a Sudo User on Ubuntu
# !/bin/sh
sudo -i
groupadd mastodon
useradd -d /home/mastodon -s `which bash` -g mastodon -m mastodon
echo "mastodon ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
passwd mastodon
usermod -aG sudo mastodon
su - mastodon
sudo apt update
sudo -i
groupadd app
useradd -d /home/app -s `which bash` -g app -m app
echo "app ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
passwd app
usermod -aG sudo app
su - app
sudo apt update -y && sudo apt upgrade -y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment