-
-
Save 0x07CB/35fb21bf1f03b37aee7202fbcf80bbf3 to your computer and use it in GitHub Desktop.
SUDOERS cheatsheet
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
# REMEMBER TO USE VISUDO - you can potentially lock yourself out if sudoers file has parse error | |
# change visudo editor to VIM | |
Defaults editor=/usr/bin/vim | |
# example of /etc/sudoers.d/lbbackup | |
Cmnd_Alias LS_HARDWARE = /usr/bin/lshw | |
Cmnd_Alias MOUNT_UDF = /bin/mount -oloop\,rw * | |
Cmnd_Alias UNMOUNT_UDF = /bin/umount /data/TEMP_UDF_DIR/MOUNT_UDF | |
lbbackup ALL=(ALL) NOPASSWD: LS_HARDWARE, MOUNT_UDF, UNMOUNT_UDF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment