Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • Thank you so much for the help, Stéphane, your solution works as a charm! reboot is usually located in /usr/sbin/ and normally requires root privileges upon execution as it’s not explicitly whitelisted in /etc/sudoers file on my Debian machine, for example. Interesting point about shebangs nonetheless, thank you so much for sharing the knowledge! Commented Aug 4, 2022 at 9:45
  • As for invoking shell from within awk to get hold of some input, I’m totally fine by that and by no means an awk purist! Much obliged for the sanitise function! The hacker in you truly shows as you spot non-trivial things that may be easily abused by competent people. Wonderful and helpful answer, thank you so much once again. Commented Aug 4, 2022 at 9:49
  • @vaeu, reboot was just an example, intended to be striking enough but not as damaging as say rm -rf ~. It's not uncommon these days for reboot to be allowed to regular users as long as they're logged in locally to the system via polkit. Commented Aug 5, 2022 at 5:21