[Nut-upsuser] nut suddenly stopped working...

A.Lizard alizard at ecis.com
Tue Feb 27 21:39:45 CET 2007


At 05:31 AM 2/27/07, you wrote:
>[for general debugging like this, please keep the list copied.]
>
>On 2/27/07, A.Lizard <alizard at ecis.com> wrote:
>>At 05:09 AM 2/27/07, you wrote:
>> >On 2/27/07, A.Lizard <alizard at ecis.com> wrote:
>> >>At 04:48 AM 2/27/07, you wrote:
>> >> >On 2/27/07, A.Lizard <alizard at ecis.com> wrote:
>> >> >>and "upsd gets a 'connection refused' message" was a typo, I meant
>> >> *upsc* .
>> >> >>I haven't tried running upsd since building the wrong source package.
>> >> >
>> >> >upsc connects to upsd (this is the network portion of "Network UPS
>> >> >Tools"), so upsd needs to be running or else you will get a
>> >> >"connection refused" message from upsc.
>> >> >
>> >> >upsd also connects to the individual drivers, as Arjen as pointed out.
>> >> >
>> >> >--
>> >> >- Charles Lepple
>> >>
>> >>interesting... so I tried this and got:
>> >>
>> >>terrarium:/home/alizard#  /usr/local/ups/sbin/upsd -u root
>> >>Network UPS Tools upsd 2.0.5-pre2
>> >>/usr/local/ups/etc/upsd.conf is world readable
>> >>Connected to UPS [belkin-ups]: belkin-ups
>> >>/usr/local/ups/etc/upsd.users is world readable
>> >>terrarium:/home/alizard#
>> >>
>> >>and knutclient suddenly started displaying.
>> >>
>> >>Afterwards, I tried:
>> >>   2469 ?        00:00:00 upsd
>> >>   2515 pts/1    00:00:00 ps
>> >>terrarium:/home/alizard# kill -9 2469
>> >>terrarium:/home/alizard# /etc/init.d/nut start
>> >>Starting Network UPS Tools: (upsdrvctl failed).
>> >>terrarium:/home/alizard# /etc/init.d nut stop
>> >>bash: /etc/init.d: is a directory
>> >>terrarium:/home/alizard# /etc/init.d/nut stop
>> >>Stopping Network UPS Tools: (upsdrvctl failed) upsd upsmon.
>> >>terrarium:/home/alizard#  /usr/local/ups/sbin/upsd -u root
>> >>Network UPS Tools upsd 2.0.5-pre2
>> >>/usr/local/ups/etc/upsd.conf is world readable
>> >>Connected to UPS [belkin-ups]: belkin-ups
>> >>/usr/local/ups/etc/upsd.users is world readable
>> >>
>> >>[note - I have root , nut , alizard entries in upsd.users ]
>> >
>> >upsd.users lists roles - they don't have to be named like the system
>> >users such as root or nut.
>> >
>> >The "-u" parameter for the daemons is for overriding the choice of the
>> >"nut" system user.
>> >
>> >>terrarium:/home/alizard#  /usr/local/ups/sbin/upsd -u alizard
>> >>Network UPS Tools upsd 2.0.5-pre2
>> >>Can't chdir to /var/state/ups: Permission denied
>> >
>> >Right, permissions are usually restricted to the nut system user on
>> >that directory.
>> >
>> >>terrarium:/home/alizard#  /usr/local/ups/sbin/upsd -u nut
>> >>Network UPS Tools upsd 2.0.5-pre2
>> >>/usr/local/ups/etc/upsd.conf is world readable
>> >>Can't connect to UPS [belkin-ups] (belkin-ups): Permission denied
>> >
>> >This is also expected, since it sounds like you still have the driver
>> >running with "-u root".
>>
>>I haven't been able to get it to run any other way - newhidups outputs
>>(non-root and root) below.
>
>Right. The fact that it works when both the driver and upsd are passed
>"-u root" points to a permissions problem.
>
>Basically, you need to pass the same system user to "-u" on both the
>driver and upsd.

How?

thanks
A.Lizard

>Users in ups.users are not connected to the system user IDs, but they
>are one part of the system used to prevent random users from being
>able to shut down the system.
>
>--
>- Charles Lepple

member The Internet Society (ISOC), The HTML Writers Guild.
"You can't have in a democracy various groups with arms - you have to have 
the state with a monopoly on power." Condoleeza Rice, US Secretary of State
Personal Website http://www.ecis.com/~alizard
business Website http://www.reptilelabs.com
backup address (if ALL else fails) alizard at gmail.com
PGP 8.0 key available by request or keyserver. Download PGP from:
http://www.pgpi.org for e-mail privacy.
Disaster prep info: http://www.ecis.com/~alizard/y2k.html
***Looking for INTELLIGENT new technology public policy 
alternatives?***               http://www.ecis.com/~alizard/technology.html




More information about the Nut-upsuser mailing list