IBT-FMI / gebuilder

Gentoo System and Image Builder
GNU General Public License v3.0
11 stars 0 forks source link

"chpasswd: Cannot determine your user name." #20

Closed TheChymera closed 6 years ago

TheChymera commented 6 years ago

gebuild stemgentoo openstack_image

Currently fails with:

Setting root-password to t00r
chpasswd: Cannot determine your user name.
Exiting

Debugging shows that the command in question is:

chpasswd -R /usr/share/gebuilder/roots/stemgentoo/root/../mnt <<< root:t00r

which also fails to execute from the normal root prompt. Passwords can be changed and users added once inside the chroot, so it does not look like a permissions issue.

@Doeme , any ideas ?

Doeme commented 6 years ago

Hah, I had the same problem while manually doing the same thing a few weeks ago. I'm not sure what changed (it used to work perfectly), but I don't really like people breaking my workflows.

I think as a fix, one could just chroot into the environment before changing the password.

TheChymera commented 6 years ago

Yeah, I also had this on auto, and it just broke a while ago. maybe some stage 3 change or maybe chpasswd (and the containing package, sys-apps/shadow looks like it was last updated in May).

TheChymera commented 6 years ago

@Doeme the fix seems to make $OPENSTACK_ROOT_PASSWORD inaccessible:

Executing openstack_image/stemgentoo/36-change_password.sh.chroot
Ensuring /usr/share/gebuilder/roots/stemgentoo/root/../logs/openstack_image/ is a directory
chroot done
chrooting
Setting root-password to
chpasswd <<< "root:"
BAD PASSWORD: it is WAY too short
BAD PASSWORD: is a palindrome
No password supplied
chpasswd: (user root) pam_chauthtok() failed, error:
Authentication token manipulation error
chpasswd: (line 1, user root) password not changed
Exiting
Doeme commented 6 years ago

Ah. Right. That's annoying. I pushed another patch that exports all the configuration, but it's getting rather ugly.