Bug #9849
closedNUT not starting as root? Isn't loading USB drivers?
0%
Description
It looks like the NUT/UPS driver isn't loading the USB driver unless I pass the "-u root" parameter to the command:
[2.4.4-RELEASE][admin@router.nooblink.com]/root: /usr/local/sbin/upsdrvctl start Network UPS Tools - UPS driver controller 2.7.4 Network UPS Tools - Generic HID driver 0.41 (2.7.4) USB communication driver 0.33 No matching HID UPS found Driver failed to start (exit status=1) [2.4.4-RELEASE][admin@router.nooblink.com]/root: /usr/local/sbin/upsdrvctl -u root start Network UPS Tools - UPS driver controller 2.7.4 Network UPS Tools - Generic HID driver 0.41 (2.7.4) USB communication driver 0.33 Using subdriver: CyberPower HID 0.4
Notice how the first time I run the command it has an error, but if I run it with the "-u root" parameter, it loads successfully and sees my UPS.
Also, if I make changes via the WebUI configurator, it seems to restart/reload the service and it can't find my UPS.
Updated by Ryan McCullough almost 5 years ago
I think I found a work-around. I went into the Services > UPS and then selected the UPS Settings tab. From there, click the "Display Advanced" button.
In the ups.conf section add this line:
user = root
Updated by Braden McGrath over 4 years ago
Ryan McCullough wrote:
It looks like the NUT/UPS driver isn't loading the USB driver unless I pass the "-u root" parameter to the command:
[...]Notice how the first time I run the command it has an error, but if I run it with the "-u root" parameter, it loads successfully and sees my UPS.
Also, if I make changes via the WebUI configurator, it seems to restart/reload the service and it can't find my UPS.
You should not need to do this... NUT loads the USB driver on my system fine, without specifying "user=root"
However, I did have to tell it that I have a "Local USB" UPS, set the name of the UPS (I just use "ups", because that's what Synology wants to see and my Synology is a slave/client of NUT on my pfSense machine), and I selected the "usbhid" driver under the "Driver Settings".
The only additional monkeying around I had to do was to add manual stanzas to the upsd.users section, and again this is just to make my Synology happy.
You may need to reboot the pfSense box to get it to detect the UPS though... I personally would not want a UPS daemon running as root on a box.
Updated by Ryan McCullough over 4 years ago
Braden McGrath wrote:
Ryan McCullough wrote:
It looks like the NUT/UPS driver isn't loading the USB driver unless I pass the "-u root" parameter to the command:
[...]Notice how the first time I run the command it has an error, but if I run it with the "-u root" parameter, it loads successfully and sees my UPS.
Also, if I make changes via the WebUI configurator, it seems to restart/reload the service and it can't find my UPS.
You should not need to do this... NUT loads the USB driver on my system fine, without specifying "user=root"
However, I did have to tell it that I have a "Local USB" UPS, set the name of the UPS (I just use "ups", because that's what Synology wants to see and my Synology is a slave/client of NUT on my pfSense machine), and I selected the "usbhid" driver under the "Driver Settings".The only additional monkeying around I had to do was to add manual stanzas to the upsd.users section, and again this is just to make my Synology happy.
You may need to reboot the pfSense box to get it to detect the UPS though... I personally would not want a UPS daemon running as root on a box.
Hmm, I will try restarting my pfSense appliance when I get home and see if it works without the root parameter.
Updated by Kris Phillips almost 4 years ago
- Status changed from New to Rejected
Marking bug report as rejected, since it is unable to be confirmed as an issue.