Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 157069 - sys-power/nut - nut user is not added to nut group correctly
Summary: sys-power/nut - nut user is not added to nut group correctly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
: 157096 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-12-04 04:20 UTC by phceac
Modified: 2007-02-25 11:10 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description phceac 2006-12-04 04:20:18 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
*** Bug 157096 has been marked as a duplicate of this bug. ***
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-02-25 11:10:28 UTC
in cvs