On Sat, Jan 19, 2013 at 3:11 PM, Aleix Conchillo Flaqué
<aconchi...@gmail.com> wrote:

>      # groupadd guix-builder
>      # for i in `seq 1 10`;
>        do
>          useradd -g guix-builder -d /var/empty -s `which nologin` \
>                  -c "Guix build user $i" guix-builder$i;
>        done
>
> I get this error when trying to build a package "guix-package -i guile":
>
> error: build failed: the build users group `guix-builder' has no members
>

I think this is because nix uses "getgrnam"
(nix/libstore/build.cc:472) which returns information only from
/etc/group not from /etc/passwd where the main group is stored. By
default, if you specify -g in useradd that would be the primary group
and is only stored in /etc/passwd.

So, the solution is:

useradd -g guix-builder -G guix-builder  ....

This will set the primary group in /etc/passwd and will also add the
user in guix-builder group in /etc/group. You might not specify -g
guix-builder which is OK, but it will generate an additional group for
each user.

Aleix

Reply via email to