Patrick Shanahan wrote:
* David C. Rankin
[06-27-08 21:04]: Breakthrough! "User *upsd* must be in group *uucp*". upsd starts fine with the "rcupsd" init script after that. You can try with port=auto, but if you have any problems use mknod to create /dev/hiddev0:
cd /dev mknod /dev/hiddev0 c 180 96 chown :uucp hiddev0 chmod 0664 hiddev0
Give it a shot!
21:29 wahoo:~ # ll /dev/hiddev0 crw-rw-r-- 1 root uucp 180, 96 Jun 27 21:28 /dev/hiddev0
21:29 wahoo:~ # groups pat pat : users audio cdrom privoxy public uucp video
21:29 wahoo:~ # upscmd myups@localhost test.panel.start Username (root): Password: Instant command failed: Access denied
but don't understand the need to join uucp when issuing the cmd as root ???
My "guess" is that internal to the nut software, it wants to talk as part of
group uucp, thus the group designation on /dev/hiddev0. I think I have
encountered additional hard coded constraints such as changing the name of
myups to nirvana_ups. The cgi scripts still look for myups despite the setup of
ups.conf and upsmon.conf. I'll look into that later:
[20:52 nirvana/srv/www/htdocs] # upscmd -l myups
Instant commands supported on UPS [myups]:
load.off - Turn off the load immediately
load.on - Turn on the load immediately
shutdown.stop - Stop a shutdown in progress
beeper.on - Enable the UPS beeper
beeper.off - Temporarily mute the UPS beeper
Don't forget to set the .htaccess file for /cgi-bin/nut. (see
/etc/ups/upsset.conf) You will also have to modify
/etc/apache2/default-server.conf and set