Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 157096

Summary: sys-power/nut - nut user is not added to nut group correctly
Product: Gentoo Linux Reporter: phceac
Component: New packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: VERIFIED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description phceac 2006-12-04 06:08:40 UTC
Nut user is not added to the nut group.

I think it is due to lack of quotes in the enewuser command.

To fix my system, where this ebuild has already been merged, had to use gpasswd to fix it.

Additionally, it seems that the hardcoded uid and gid (84) should be changed to -1 as in http://devmanual.gentoo.org/ebuild-writing/users-and-groups/index.html  (this fix is not included in the diff below)

Example diff:

--- nut-2.0.4-r1.ebuild_orig    2006-12-04 12:53:10.000000000 +0100
+++ nut-2.0.4-r1.ebuild 2006-12-04 13:08:01.000000000 +0100
@@ -34,9 +34,11 @@

 pkg_setup() {
        enewgroup nut 84
-       enewuser nut 84 -1 /var/state/nut nut,tty
+       enewuser nut 84 -1 /var/state/nut "nut,tty"
        # try to add nut to the tty group for old cases where it already existed             
        gpasswd -a nut tty
+       # also necessary for the nut group, to fix for quote bug on enewuser
+       gpasswd -a nut nut
        warningmsg
 }
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-12-04 08:58:23 UTC

*** This bug has been marked as a duplicate of 157069 ***
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-12-04 08:58:41 UTC
Dupe.