<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Being such a beginner, I didn't realize I was creating a problem
with root...I took your advice and removed "sudo"...is that enough,
or is there something else I should do for security?<br>
<br>
<div class="moz-cite-prefix">On 3/7/2021 5:06 AM, Roger Price wrote:<br>
</div>
<blockquote type="cite"
cite="mid:alpine.DEB.2.20.2103071057120.6375@maria.rogerprice.org">On
Sat, 6 Mar 2021, Jon Kinne via Nut-upsuser wrote:
<br>
<br>
<blockquote type="cite">I created a script called "reboot_notify"
and saved it in usr/local/bin, and it looks like this:
<br>
</blockquote>
<br>
Yes, good approach to the problem. In my solution there was an
error. Instead of "@reboot root ups-report &", I should have
said "@reboot nut ups-report &". It was bad security to
execute as superuser.
<br>
<br>
<blockquote type="cite"># Have the system pause while all the mail
elements load,
<br>
sleep 60
<br>
# and then run the script:
<br>
sudo /usr/local/bin/reboot_notify
<br>
</blockquote>
<br>
Do you need to get root involved? If a hacker can substitute his
reboot_notify for yours, he gets full control.
<br>
<br>
Roger<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Nut-upsuser mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nut-upsuser@alioth-lists.debian.net">Nut-upsuser@alioth-lists.debian.net</a>
<a class="moz-txt-link-freetext" href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a>
</pre>
</blockquote>
<br>
</body>
</html>