Since there is apparently no immediate solution to upsstats.cgi not reading the output voltage correctly, I have moved on to trying to use upsset.cgi. To recap the UPS is a CyberPower CyberPower CP1500PFCLCD UPS running on a headless server running Slackware 14.1 with the 3.10.7 kernel. The version of NUT is 2.71 and I am using usbhid-ups for communication with the UPS The problem is that when I run upsset.cgi I first get a prompt for user name and password. I then enter the same username and password as I established in upsd.users and it seems to accept it. When I try to change a setting on the settings page however I receive an access denied message. An example is below. set input.transfer.high to 142 (was 136) Unexpected response: ERR ACCESS-DENIED No settings changed. I also receive a similar message when I try to use the quick command screen. Sending command: test.battery.start.quick Response: ERR ACCESS-DENIED Anyone have a suggestion on what is wrong.
Charles Lepple
2014-Apr-24 13:13 UTC
[Nut-upsuser] CyberPower CP1500PFCLCD and NUT upsset.cgi
On Apr 15, 2014, at 2:18 PM, Bill S wrote:> Since there is apparently no immediate solution to upsstats.cgi not > reading the output voltage correctly, I have moved on to trying to use > upsset.cgi. To recap the UPS is a CyberPower CyberPower CP1500PFCLCD > UPS running on a headless server running Slackware 14.1 with the > 3.10.7 kernel. The version of NUT is 2.71 and I am using usbhid-ups > for communication with the UPS > > The problem is that when I run upsset.cgi I first get a prompt for > user name and password. I then enter the same username and password > as I established in upsd.users and it seems to accept it. When I try > to change a setting on the settings page however I receive an access > denied message. An example is below. > > set input.transfer.high to 142 (was 136) > Unexpected response: ERR ACCESS-DENIED > No settings changed. > > I also receive a similar message when I try to use the quick command screen. > > Sending command: test.battery.start.quick > Response: ERR ACCESS-DENIED > > Anyone have a suggestion on what is wrong.If anyone else on the list has used upsset.cgi, please feel free to chime in. I only use the command-line tools these days. To change variables or send a command, the user/password you are using needs to have permissions to do so. In the upsd.users man page, the first example, [admin], shows how to allow pretty much everything. If that doesn't work, please post upsd.users with the passwords removed. -- Charles Lepple clepple at gmail
Kris Jordan
2014-Apr-24 18:37 UTC
[Nut-upsuser] CyberPower CP1500PFCLCD and NUT upsset.cgi
Bill S wrote, On 4/15/2014 11:18 AM:> The problem is that when I run upsset.cgi I first get a prompt for > user name and password. I then enter the same username and password > as I established in upsd.users and it seems to accept it.upsset.cgi doesn't check that user/password is valid, it just tries it when doing a command. I just tested it, it is working for me on a remote and a local UPS using the below upsd.users configuration. [admin] password = xxxxxxxxxx instcmds = ALL actions = SET actions = FSD
On Thu, Apr 24, 2014 at 2:37 PM, Kris Jordan <nut01.kj at sagebrushnetworks.com> wrote:> > upsset.cgi doesn't check that user/password is valid, it just tries it when > doing a command. > > I just tested it, it is working for me on a remote and a local UPS using the > below upsd.users configuration. > > [admin] > password = xxxxxxxxxx > instcmds = ALL > actions = SET > actions = FSD >First I want to thank both you and Mr. Lepple for taking the time to post your suggestions. Your example of the upsd.users file worked fine for me. In the interest of a complete explanation, I found my example of the upsd.users file at the URL http://www.networkupstools.org/docs/user-manual.chunked/ar01s06.html and it looked like the following. [monuser] password = mypass upsmon master # or upsmon slave Based on that my upsd.users looked like [ups] password = XXXXXXX upsmon master # or upsmon slave That didn?t work but your example which I cut and pasted into upsd.users and then added my password did work with the user admin as you used. My mistake was in thinking that the ?mon? and ?set? uspd.users configurations were the same and they are not. If I had clicked on the reference ?upsd.users (5)? I would have been taken to http://www.networkupstools.org/docs/man/upsd.users.html which would have explained that. That only leaves the output voltage reported by usbhid-ups not reporting correctly but perhaps that will be solved in an updated version of it. There was no change in 2.7.2 but I did not expect any based on the change log. Thanks again to both of you.