Forked from UbuntuEvangelist/How To Create a Sudo User on Ubuntu [Quickstart]
Last active
March 20, 2022 16:53
-
-
Save parallaxhub/fe2d4caafc55d1ef9ca819aec464e5be to your computer and use it in GitHub Desktop.
Create a Sudo User on Ubuntu
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 | |
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