Skip to content

Instantly share code, notes, and snippets.

@sudoalx
Created March 4, 2023 04:24
Show Gist options
  • Save sudoalx/5ea78811cd985643f3c5d59c504fb4ab to your computer and use it in GitHub Desktop.
Save sudoalx/5ea78811cd985643f3c5d59c504fb4ab to your computer and use it in GitHub Desktop.
#!/bin/bash
# Create the user
sudo useradd -m -s /bin/bash alex
# Set the password for the user
echo "alex:1234" | sudo chpasswd
# Grant sudo privileges to the user
sudo usermod -aG sudo alex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment