Reboot from terminal?
-
How do I reboot my phone from the terminal, without having to type the password? I have a cron-job running to check connectivity, and I would like the script to able to boot the phone under certain circumstances. I tried adding: Cmnd_Alias SHUTDOWN_CMDS = /sbin/poweroff, /sbin/shutdown, /sbin/reboot & phablet ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS with visudo after remounting / as rw, but it still prompts me. Any ideas?
Regards
Grisen
-
In my terminal, "sudo reboot" works. Does "reboot" or "sudo reboot" work in your cron job?
-
Well "sudo reboot" works, but it prompts me for the password. I tried adding the job to sudo's crontab, but that doesn't work. The solution I described in post 1 works on a desktop ubuntu. After doing what I described, "sudo reboot" reboots the machine without prompting for password.
Regards
Grisen
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login