Last active
February 6, 2024 23:57
-
-
Save henri/3b9b8ca40df65991e876cb32650d3b9c to your computer and use it in GitHub Desktop.
sudo / su cheat sheet
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
# login as a user if they do not have a shell : | |
su - <user> -s /bin/bash | |
# example logging in as www-data : | |
su - www-data -s /bin/bash | |
# add user to sudo group | |
usermod -aG sudo <user-to-grant-sudo-access> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment