[Nut-upsuser] still no nut at reboot

Charles Lepple clepple at gmail.com
Sun Nov 14 22:22:21 UTC 2010

On Nov 13, 2010, at 1:58 PM, Gene Heskett wrote:

> On Saturday, November 13, 2010 01:26:16 pm Charles Lepple did opine:
>> On Nov 13, 2010, at 11:47 AM, Gene Heskett wrote:
>>> That file is currently, and I believe pursuant to the install
>>> instructions:
>>> [root at coyote init.d]# ls -l /usr/local/ups/etc/ups.conf
>>> -rw-r----- 1 root nut 95 2010-11-06 12:54 /usr/local/ups/etc/ 
>>> ups.conf
>>> What do I do to the perms etc so that this file is readable, both
>>> now, and
>>> during the bootup when I enable a link to it from /etc/rc5.d?
>> Does the mandriva script have the same assumptions about the NUT
>> username? Also, is the "nut" user part of the "nut" group?
> $NUTUSER in that script is 'gene'  aka me.  This is set by the scripts
> parsing of /usr/local/ups/etc/upsmon.conf.  I have fixed a few other
> problems in it by adding local vars for $DRIVERPATH and such.  It is
> attached.  I have made some small progress with some of the other  
> errors
> until I believe this is the final one.

I was going to try and install PCLinuxOS into a VM, but I haven't  
gotten very far with that. (It takes the VM about a half hour to boot  
to the login screen.)

However, poking around the script, the $NUTUSER variable seems to be  
referring to the "ups" user you created as part of the INSTALL file  
procedure. The upsmon.conf man page refers to another user ID (nut- 
mon) but that's a bit of extra paranoia that we can shelve for now.

> I also have not attempted as yet to port the corresponding upsmon  
> script,
> nor do I have a working /etc/shutdown.  That was pointed out when I  
> walked
> back in the house yesterday morning to discover that the slow beeps  
> were
> from the ups as everything in here was running on it, so I did a  
> shutdown -
> h now.  It was long enough that a similar ups in the shop also ran  
> out, but
> no apparent damages otherwise except the proper rebooting of another
> machine that doesn't have a ups on it.
>> Also, is this the distribution you are using? http://www.pclinuxos.com/
> Yes, all uptodate a/o last night except for tar-1.24 which breaks  
> amanda (I
> think, I will retest tonight.  I play the canary for amanda as the
> snapshots are released, have for years)
> I printed the INSTALL file, and have now been through it from square  
> one,
> checking things off as I go, restarting at step 6 at least a dozen  
> times
> now, getting the no perms thing at step 8, 9 or 10.
> From /etc/passwd:
> [root at coyote Documents]# grep ups /etc/passwd
> ups:x:479:415:system user for nut:/var/state/ups:/bin/false
> izzat ^^^^^^ ?? I've done that by hand & may have it screwed up

The numerical UID and GID don't matter much, except that the GID needs  
to match between /etc/passwd and /etc/group (which it sounds like it  
does). You can also have strange behavior if you have two usernames  
which map to the same UID, but I don't think that would cause problems  

> from /etc/group:
> [root at coyote Documents]# grep nut /etc/group
> nut:x:415:ups

That looks right.

I may have missed this answer, but are you testing by running "/etc/ 
init.d/upsd restart", or just by rebooting? The former method should  
work, although I haven't poked around to verify if this is how  
PCLinuxOS works. (I'm a bit out of my element here, having only used  
Mandriva once several years back).

More information about the Nut-upsuser mailing list