Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 777303 - stage3 fails at "emerge -u system" for non-enumerated user (eg. sssd users)
Summary: stage3 fails at "emerge -u system" for non-enumerated user (eg. sssd users)
Status: RESOLVED DUPLICATE of bug 766417
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-19 17:27 UTC by CUI Hao
Modified: 2021-10-27 14:47 UTC (History)
0 users

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


Attachments
Log snippet where the error happened (bootstrap-tmux.log,11.35 KB, text/plain)
2021-03-19 17:28 UTC, CUI Hao
Details

Note You need to log in before you can comment on or make changes to this bug.
Description CUI Hao 2021-03-19 17:27:02 UTC
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.
Comment 1 CUI Hao 2021-03-19 17:28:59 UTC
Created attachment 692457 [details]
Log snippet where the error happened
Comment 2 Guilherme Amadio gentoo-dev 2021-10-27 14:47:44 UTC

*** This bug has been marked as a duplicate of bug 766417 ***