Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Running sudo requires the user password, which a script might not know. Unless of course sudo is configured with NOPASSWD.


This 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.


Not if you have a sudo timeout enabled. Or, the proof of concept could be changed to

    alias sudo='sudo ./badscript'
where badscript runs `exec $@`.


Good considerations. Thanks.


Not even that, because sudo keeps your password in memory for a few minutes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: