Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Root-пароль к upsmon

DrBob

Newbie
Joined
Jan 6, 2015
Messages
48
Есть желание отключить писк на UPS. FreeNAS-11.2-U2.1 Программную службу upsmon я запустил.
по upscmd -l ups я получаю ответ beeper.toggle - драйвер команду поддерживает. Но при попытке дать команду через upscmd ups beeper.toggle получаю запрос имени root и пароля, при этом на ввод пароля от системной записи root получаю ошибку ERR ACCESS_DENIED.

Поиском в сети нашёл запись в LJ, о том, что это нормально и пароль берётся не из системной записи root, а содержится в /var/etc/upsmon.conf . Но я у себя такого файла не нахожу. Где искать или какой пароль по умолчанию?
 

Seymour Butt

FreeNAS Experienced
Joined
Jan 4, 2014
Messages
453

Seymour Butt

FreeNAS Experienced
Joined
Jan 4, 2014
Messages
453
Sorry, I've always made my UPS configuration changes through the UI and not the CLI.
 

DrBob

Newbie
Joined
Jan 6, 2015
Messages
48
The problem is - the graphical interface does not allow to switch off the beeper :) I surely could connect the USB cord to a notebook with a windows program and switch the beeper ofа from it - but we are not searching for the easy ways ;-)
 

DrBob

Newbie
Joined
Jan 6, 2015
Messages
48
In the LJ post that I mentioned in the initial record the author says "The root password for the command is not the one with which you log in, but the one that is configured with nut. You can see in /var/etc/upsmon.conf / UPD" . The problem is that there is no such path and I can not find the file with #find
 

Seymour Butt

FreeNAS Experienced
Joined
Jan 4, 2014
Messages
453
The path is /usr/local/etc/nut, but I strongly advise against editing the files directly. Your changes should be made through the UI so they survive a reboot. This is what I did to turn off the beeper.

Step 1: Set up a UPS user (in this example user test and password test) in the UPS configuration screen and grant the user the ability to send instant commands to the UPS.

screenshot.196b.png


Step 2: Restart the running UPS service by toggling the service off and back on. This ensures the UPS user is configured.

screenshot.198a.png


Step 3: From the Shell, toggle the state of the beeper.

To check the state of the beeper:
Code:
upsc ups@localhost

To toggle the state of the beeper:
Code:
upscmd -u test -p test ups@localhost beeper.toggle

Apart from toggling the beeper, you may be able to execute other UPS specific actions such as run battery tests. To see the list of supported commands for your UPS:
Code:
upscmd -l ups@localhost
 
Last edited:

DrBob

Newbie
Joined
Jan 6, 2015
Messages
48
Yep, that worked, thanks.
I was always amazed how deep simple things could be hidden in * nix systems ;-)
Though it did not solve the problem - the beeper does not react to the command...
 
Last edited:
Top