(May-07-2018, 02:52 PM)wavic Wrote: Yes but this is not quite safe. I imagine the day I am away from the laptop and my little sister starts typing whatever she wants.No little sister at work (actually, no little sister)!
Since OP could use sudo in a app, probably that's how his user is defined.
At my employee's VMs in the lab are defined with some users sudoers - otherwise, running anything on a test server will be next to impossible - and our environment is behind VPN.
Back to our muttons - program started with sudo cannot be interrupted without it (sudo) by a regular user - that was OP's problem before he started the whole script with sudo.
Test everything in a Python shell (iPython, Azure Notebook, etc.)
- Someone gave you an advice you liked? Test it - maybe the advice was actually bad.
- Someone gave you an advice you think is bad? Test it before arguing - maybe it was good.
- You posted a claim that something you did not test works? Be prepared to eat your hat.