Last active
May 6, 2021 00:43
-
-
Save epomatti/36c2dddcd0e66d7de82bd1a6374ed9bb to your computer and use it in GitHub Desktop.
Script to create a RedHat Linux user with root permissions
This file contains 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
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