I was bootstraping prefix on a computing cluster where SSSD is used to manage users. It failed at stage 3 when "running emerge -u system". Reproducible: Always Steps to Reproduce: 1. Run bootstrap-prefix.sh with a user not listed by "getent passwd", such as those provided by SSSD. Actual Results: Stage3 failed at "emerge -u system". See attached log for detail. Key errors are: "portage: 'portage' user or group missing" and "portage.exception.OperationNotPermitted: chown('/home/cuih7/gentoo/var/log/emerge-fetch.log', 0, 1002)". So seems portage thought it should run as uid=0 (root) gid=1002 (my gid). I checked "$EPREFIX/etc/passwd", my user is not listed in it. I guess this is why portage fallback to uid=0. In bootstrap-prefix.sh, "$EPREFIX/etc/passwd" is generated from the output of "getent passwd". This cluster disable SSSD user enumeration so my user is not visible via "getent passwd". I manually added my user to "$EPREFIX/etc/passwd": $ getent passwd $(whoami) >> $EPREFIX/etc/passwd then resumed bootstraping. For now it's working, it has passed where it failed.
Created attachment 692457 [details] Log snippet where the error happened
*** This bug has been marked as a duplicate of bug 766417 ***