NUT (ups) cannot change parameter in UPS

keithg

Explorer
Joined
May 15, 2013
Messages
92
So, I have a UPS and I want to change a parameter on the UPS. The user is cyber and the password is cyber. When I go on the cli and get a listing, I can see it:
Code:
root@NAS:/usr/local/etc/nut # upsrw ups@127.0.0.1
[battery.charge.low]
Description unavailable
Type: STRING
Maximum length: 10
Value: 10

[battery.runtime.low]
Description unavailable
Type: STRING
Maximum length: 10
Value: 300

[input.transfer.high]
Description unavailable
Type: STRING
Maximum length: 10
Value: 140

[input.transfer.low]
Description unavailable
Type: STRING
Maximum length: 10
Value: 100

[ups.delay.shutdown]
Description unavailable
Type: STRING
Maximum length: 10
Value: 20

[ups.delay.start]
Description unavailable
Type: STRING
Maximum length: 10
Value: 30

When I try to change it, I get this every time:
Code:
root@NAS:/usr/local/etc/nut # upsrw -s battery.runtime.low=100 ups
Username (root): root
Password:
Unexpected response from upsd: ERR ACCESS-DENIED

My /usr/local/etc/nut/upsd.users file is:
Code:
[root]
        password = cyber
        upsmon master
        root

[cyber]
        password = cyber
        actions = set
        actions = fsd
        instcmds = all

I've tried root/cyber, cyber/cyber, root and NAS password. I am confused as to what I should do to change this. I believe I have done this in the past and it was not all that painful. I am running FreeNAS-11.3-U3.1
 

keithg

Explorer
Joined
May 15, 2013
Messages
92
I did not and recently got advice to turn off the UPS service because I am now getting periodic spontaneous reboots. I turned it off this weekend and still got a reboot, so it is probably not the cause. I am on TrueNAS Core 13, now and have not tried this recently (this thread is 2+ years old). and yours is the first response...
 
Joined
Apr 21, 2012
Messages
25
This problem bothers me too. I'd like to write parameter changes to my UPS without having to disconnect my TrueNAS (Core) from my UPS in order to move it to another server that would let me use upsd to write. In particular, I've wanted change the "battery.mfr.date" after a battery change, change the "battery.charge.low", "ups.beeper.status", and "ups.delay.shutdown" at this time, but there are other parameters that I might also want to change as the batteries age. Experience has shown me that online "battery tests" don't really show me how long the battery will continue to power the attached devices. Pulling the plug and using a stopwatch while looking at the load indicator on the LCD, or pulling the batteries and doing an internal resistance test seem to be the only way to really tell how much longer one can wait before replacing the batteries. Now in a commercial environment, replacing batteries every "x" months is probably economical, home users like me are willing to take a greater risk so I like to exercise upsrw and upscmd without getting an "unexpected response from upsd: ERR_READONLY message.

Now back in the days of FreeNAS 7.3 we were allowed to change permissions on the core, but I can't remember the trick of logging in and immediately making the core rw then rewriting the change, and I expect iXsystems really doesn't want users to do the same, but it would be nice to allow one to write to the firmware of attached devices, like UPSes in the future, so I'd like to see such as a feature change.
Meanwhile, I'll shut down my TrueNAS server to attach the UPS temporarily to a laptop and make the change to its firmware, which will show up when it's reattached to my TrueNAS server.
 
Top