UPS attached and communication established

Status
Not open for further replies.

geronimo1958

Contributor
Joined
Nov 19, 2011
Messages
112
I get response with the following:

upsc ups@localhost

and I get a bunch of data like:

battery.charge: 100
battery.charge.low: 10
battery.charge.warning: 50
battery.date: not set
battery.mfr.date: 2002/10/26
battery.runtime: 4012
.
.
.

Including the name of my UPS (APC Back-UPS ES 725)

and when I issue the following:

upscmd -l ups

I get:

beeper.disable - Disable the UPS beeper
beeper.enable - Enable the UPS beeper
beeper.mute - Temporarily mute the UPS beeper
beeper.off - Obsolete (use beeper.disable or beeper.mute)
beeper.on - Obsolete (use beeper.enable)
load.off - Turn off the load immediately
load.off.delay - Turn off the load with a delay (seconds)
shutdown.reboot - Shut down the load briefly while rebooting the UPS
shutdown.stop - Stop a shutdown in progress
test.panel.start - Start testing the UPS panel
test.panel.stop - Stop a UPS panel test

All seems good.

But when I try and issue a command to disable the beeper:

upscmd ups beeper.disable

I get:

[myusername@freenas] # upscmd ups beeper.disable
Username (root):
Password:
Unexpected response from upsd: ERR ACCESS-DENIED

I have used all the various users and associated passwords and always get the same error. Obviously I am missing something. I have set a password in the UPS GUI section.

Any ideas?
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Not all UPSes are compatible with all of those options. I've never tried to disable the beeper since I WANT to know if I'm on the battery, but that's my first guess as to what your problem is.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
You _may_ need to create an additional user with admin rights.
No _may_ about it. It's required to setup an additional user with admin rights if the OP hasn't done so already.
 

geronimo1958

Contributor
Joined
Nov 19, 2011
Messages
112
I found some documentation on the web. I will look into adding a user with admin rights.

Thanks to all that replied.
 

geronimo1958

Contributor
Joined
Nov 19, 2011
Messages
112
I found the location of the user file

/etc/local/nut/upsd.users

I add a user that should be able to execute some commands to the UPS.

I reboot and the changes I made disappear.

Any idea why this is happening?
 

geronimo1958

Contributor
Joined
Nov 19, 2011
Messages
112
That just adds a single line of "user" to the upsd.users file it does not use the proper syntax

[user]
other parameters
 

geronimo1958

Contributor
Joined
Nov 19, 2011
Messages
112
I will try and minic the syntax.
 

geronimo1958

Contributor
Joined
Nov 19, 2011
Messages
112
That did it.
 

cstathoulis

Dabbler
Joined
Sep 1, 2014
Messages
20
Hi ,

Can someone please post "clearer" instructions on how to "upscmd ups beeper.disable" . I can't seem to find the path /etc/local/nut/upsd.users
Basically, what steps do I need to do to disable the "beeper" and what Password is required.


[myusername@freenas] # upscmd ups beeper.disable
Username (root):
Password:
Unexpected response from upsd: ERR ACCESS-DENIED

Thanks in advance.
 

cstathoulis

Dabbler
Joined
Sep 1, 2014
Messages
20
Like the thread says, it's here. To use it at FN, go to ups settings and add:

[admin]
password = mypass
instcmds = all

to EXTRA USERS field.

Have fun! ;)

Thanks for your quick reply, but silly question, I haven't been able to find where "/etc/local/nut/upsd.users" is located. Is this a default path which is created by FreeNAS or do I have to install something else.

Thanks. :)
 

cstathoulis

Dabbler
Joined
Sep 1, 2014
Messages
20
Use the GUI. Go to Services -> UPS and use EXTRA users field.

I suspected as much after going through the web and manual...

so, if I write "upscmd ups beeper.disable" in the "Services -> UPS and use EXTRA users field" I should be fine(?)

Many Thanks
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
No that command needs to be run from cli.
 

cstathoulis

Dabbler
Joined
Sep 1, 2014
Messages
20
OK.... I think I have it now..(?)

From the "Services -> UPS and use EXTRA users field" we add the following:
[admin]
password = mypass (for example)
instcmds = all

and then from the FreeNAS SHELL we enter the command:
"upscmd ups beeper.disable"
 

cstathoulis

Dabbler
Joined
Sep 1, 2014
Messages
20
It worked..!!!

Thanks a million...:D
 
Status
Not open for further replies.
Top