*New 12.1 series Release:
2019-11-08: XigmaNAS 12.1.0.4.7091 - released!

*New 11.3 series Release:
2019-10-19: XigmaNAS 11.3.0.4.7014 - released


We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

How to disable UPS beeper (bug and workaround)

Uninterruptable Power Supply service using NUT.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
User avatar
Snufkin
Advanced User
Advanced User
Posts: 293
Joined: 01 Jul 2012 11:27
Location: Etc/GMT-3 (BSD style)
Status: Offline

How to disable UPS beeper (bug and workaround)

#1

Post by Snufkin » 11 Feb 2017 18:21

Wanted to silence screaming beeper of my Ippon Back Power Pro 400.

Code: Select all

# upscmd -l Ippon
Instant commands supported on UPS [Ippon]:

beeper.toggle - Toggle the UPS beeper
load.off - Turn off the load immediately
load.on - Turn on the load immediately
shutdown.return - Turn off the load and return when power is back
shutdown.stayoff - Turn off the load and remain off
shutdown.stop - Stop a shutdown in progress
test.battery.start - Start a battery test
test.battery.start.deep - Start a deep battery test
test.battery.start.quick - Start a quick battery test
test.battery.stop - Stop the battery test
Disabling the beeper can be done and had been done at the time of FreeNAS 0.7.2 with no problem.
Note that root password was stored in configuration files in plain text. And it was not safe.

In NAS4Free 11.0.0.4 root password is stored encrypted, and it is considered safe.
But in case of UPS administration it resulted in an error.

Code: Select all

# upscmd Ippon beeper.toggle
Username (root): root
Password:
Unexpected response from upsd: ERR ACCESS-DENIED
Workaround is quite simple
  1. copy NAS4Free root encrypted password from NAS4Free main configuration xml file, sections <system> or <ups>
  2. at the upscmd password prompt just paste above string (do not expect to see it on the screen) and hit Enter.
That's it.

Why upscmd administration program doesn't accept original root password but works flawlessly with encrypted one?
Look in upsd.users file

Code: Select all

# cat /var/etc/upsd.users
[root]
        password = <NAS4Free root encrypted password>
        actions = set
        instcmds = all
        upsmon master

[upsmon]
        password = upsmon
        upsmon slave
This the point where probable bug sits. Maybe when there is a parsing of upsd.users for command line arguments/options a certain procedure to restore original root password from encrypted one failed or missed at all.
But this is just my guess to help NAS4Free developers to fix this little bug.
XNAS 11.3.0.4 embedded, ASUS P5B-E, Intel DC E6600, 4 GB DDR2, 2 x HGST HDN726040ALE614, 2 x WDC WD5000AAKS, Ippon Back Power Pro 400

User avatar
zoon01
Developer
Developer
Posts: 771
Joined: 20 Jun 2012 21:06
Location: Netherlands
Contact:
Status: Offline

Re: How to disable UPS beeper (bug and workaround)

#2

Post by zoon01 » 24 Feb 2017 02:54

Thanks for report,
I will soon spend some time on it to see what we can do,
but currently this is a limitation as nut software uses standard plaintext, that's why the encrypted key works for you.
System specs: XigmaNAS 11.2.0.4 -embedded on Samsung 860 EVO 256GB and Supermicro X10SL7-F w / Bios v3.2, IPMI v.03.84 / CPU E3-1241 v3 @ 3.50GHz - 32GB Crucial DDR3L 1600mhz ECC 1.35v , LSI 2308 on PH20.00.07.00 IT mode, Storage: 5x Western Digital Red (WD30EFRX) raidz

Development system is same system in virtualbox.

batsi
NewUser
NewUser
Posts: 3
Joined: 18 Dec 2016 23:02
Location: Munich, Germany
Status: Offline

Re: How to disable UPS beeper (bug and workaround)

#3

Post by batsi » 02 May 2019 21:11

Hi,

connected my new UPS today and ran in the same problem. So it's still the same in current 11.2.0.4 (6625).
Probably not many people try to change options on their UPS through NUT on XigmaNAS.

I already tried to edit config.xml directly and setting a cleartext password (of course not the same as the admin pass).
But on restarting the UPS/NUT service it get's reset with the hash from the root/admin password again.

User avatar
ms49434
Developer
Developer
Posts: 759
Joined: 03 Sep 2015 18:49
Location: Neuenkirchen-Vörden, Germany - GMT+1
Contact:
Status: Offline

Re: How to disable UPS beeper (bug and workaround)

#4

Post by ms49434 » 03 May 2019 00:25

batsi wrote:
02 May 2019 21:11
Hi,

connected my new UPS today and ran in the same problem. So it's still the same in current 11.2.0.4 (6625).
Probably not many people try to change options on their UPS through NUT on XigmaNAS.

I already tried to edit config.xml directly and setting a cleartext password (of course not the same as the admin pass).
But on restarting the UPS/NUT service it get's reset with the hash from the root/admin password again.
could you please test /usr/local/www/services_ups.php from commit 6683 and let me know if it fixes your issue?
(you should re-enter the root password into the Master Password field because it might contain the hashed password)
1) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 22GB out of 32GB ECC RAM, LSI 9300-8i IT mode in passthrough mode. Pool 1: 2x HGST 10TB, mirrored, SLOG: Samsung 850 Pro, L2ARC: Samsung 850 Pro, Pool 2: 1x Samsung 860 EVO 1TB , services: Samba AD, CIFS/SMB, ftp, ctld, rsync, syncthing, zfs snapshots.
2) XigmaNAS 12.0.0.4 amd64-embedded on a Dell T20 running in a VM on ESXi 6.7U2, 8GB out of 32GB ECC RAM, IBM M1215 crossflashed, IT mode, passthrough mode, 2x HGST 10TB , services: rsync.

Post Reply

Return to “UPS”