I have a Debian-based system (most likely an Ubuntu 18.04 LTS) with a user, say user
, that executes an application (as a daemon). The system is not exposed to the Internet with a public IP address.
This application needs to reboot, stop processes (using killall
) and execute network commands using nmcli
. It does this by calling bash
, which executes the commands as root. Since the application cannot insert the password when calling the commands above, I configured user
to be able to launch the reboot
, killall
and nmcli
commands with sudo
without the need to type the password.
Though, I feel like this is a bad practice and I would like to use some more secure and robust system.
Can someone please provide some advice & insight?