[Nut-upsuser] help requested for setting up email notification of UPS events

Greg Troxel gdt at lexort.com
Sun Jan 11 12:08:32 GMT 2026


hakayova via Nut-upsuser <nut-upsuser at alioth-lists.debian.net> writes:

>>   - check that the script is 755 or 555 permissions
>
> Indeed this was a problem. I modified the permissions from 750 to 755.

And below you seem to have more permissions problems.   If using ports,
that should set things up right, but it's tricky.  The pkgsrc entry
(NetBSD) may be helpful, perhaps more to the port maintainer.

>>   - become the nut user with su, /bin/sh, and clear out the environment.
> Cannot do it in FreeBSD, it appears.
> # su nut
> This account is currently not available.
> # su -l nut /usr/local/bin/mailme
> su: no directory
> # cat /etc/passwd | grep nut
> nut:*:316:316:Network UPS Tools user:/nonexistent:/usr/sbin/nologin

Read the man page for su: https://man.freebsd.org/cgi/man.cgi?query=su

Use -m.  Then use env to adjust the environment, so that PATH is the
system default.

>>   - read /var/log/messages and /var/log/maillog, or however you spell
>>     those logs on your system
> Thanks to this pointer, I realized that upsd.conf and upsmon.conf were
> owned by root and could not be accessed by the nut user. I changed the
> ownership of them and set permissions to 750. The error messages in
> /var/log/messages disappeared after that.
>
> /var/log/maillog does not show any entry with the power outage
> simulation, likely becuase the nut user cannot find and execute the
> mailme script as described above.

So what happens after you fixed your permissions problems?

How did you install nut?



More information about the Nut-upsuser mailing list