3 ms·
Running sudo requires the user password, which a script might not know. Unless of course sudo is configured with NOPASSWD.
by vortico 7y ago
Running sudo requires the user password, which a script might not know. Unless of course sudo is configured with NOPASSWD.
- loeg 7y agoThis alias just prompts the user twice, as if the user made a typo the first time. Unless you know you're a perfect typist, it's somewhat subtle.
- NieDzejkob 7y agoNot even that, because sudo keeps your password in memory for a few minutes.
- vortico 7y agoNot if you have a sudo timeout enabled. Or, the proof of concept could be changed to alias sudo='sudo ./badscript' where badscript runs `exec $@`.
- loeg 7y agoGood considerations. Thanks.