Root-пароль к upsmon

DrBob

Dabbler
Joined
Jan 6, 2015
Messages
46
Есть желание отключить писк на 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 . Но я у себя такого файла не нахожу. Где искать или какой пароль по умолчанию?
 
Joined
Jan 4, 2014
Messages
1,644

DrBob

Dabbler
Joined
Jan 6, 2015
Messages
46
Screenshot_2019-03-26 FreeNAS - 192 168 1 99.png

Any more ideas? This was the first I tried after the root
 
Joined
Jan 4, 2014
Messages
1,644
Sorry, I've always made my UPS configuration changes through the UI and not the CLI.
 

DrBob

Dabbler
Joined
Jan 6, 2015
Messages
46
The problem is - the graphical interface does not allow to switch off the beeper :smile: 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

Dabbler
Joined
Jan 6, 2015
Messages
46
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
 
Joined
Jan 4, 2014
Messages
1,644
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

Dabbler
Joined
Jan 6, 2015
Messages
46
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