Sunday, April 14, 2019

security - How to get a program to startup at start if it requires sudo to start



I have got a program which to start needs to be started with sudo, but as it would be very useful for this program to start up at startup without me having to manually start it, is there a way to get a program to start up at start up that would need to have sudo before it and then an admin password given to run it? And is there any way of doing this without causing a security risk?






OS Information:



Description:    Ubuntu 14.10
Release: 14.10



I think it's not possible without configuring sudo to let the user launch the program without a password (through /etc/sudoers and the NOPASSWD option), which can be considered like a more or less important security risk depending on the program involved.



The best that can be done is to instruct sudo to restrict this to a single user, and only for that particular program, with a line like:



my_user ALL = (root:root) NOPASSWD: /path/to/my_program


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...