Skip to content

Instantly share code, notes, and snippets.

@epomatti
Last active May 6, 2021 00:43
Show Gist options
  • Save epomatti/36c2dddcd0e66d7de82bd1a6374ed9bb to your computer and use it in GitHub Desktop.
Save epomatti/36c2dddcd0e66d7de82bd1a6374ed9bb to your computer and use it in GitHub Desktop.
Script to create a RedHat Linux user with root permissions
useradd $username
passwd $username
# open and uncomment "%wheel ALL=(ALL) ALL" line
visudo
# add user to wheel group, this is the admin group
usermod -aG wheel $username
# check if user has root permissions
su $username
sudo whoami
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment