How can i run a command in shell script with sudo? This script will be run by a cron job, so there should be no human intervention to enter a password manually.
Enter the cronjob in
sudo crontab -e
then the whole script will be executed as root per default without the need of a password.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With