Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 906099

Summary: Error message for non existent user specified in PORTAGE_USERNAME says the wrong user
Product: Portage Development Reporter: throwd <throwd>
Component: Core - ConfigurationAssignee: Portage team <dev-portage>
Status: UNCONFIRMED ---    
Severity: normal CC: gentoo
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description throwd 2023-05-10 23:33:29 UTC
If the option PORTAGE_USERNAME is set to a non existent user the error message says that the user portage is missing instead of the user specified in PORTAGE_USERNAME is missing. 

Came across this while migrating my builds into containers and didn't add the user I use in PORTAGE_USERNAME to /etc/passwd. Was confused why it was saying portage didn't exist, but I eventually figured it out.

PORTAGE_USERNAME=notreal emerge --sync
portage: 'portage' user or group missing.
         For the defaults, line 1 goes into passwd, and 2 into group.
         portage:x:250:250:portage:/var/tmp/portage:/bin/false
         portage::250:portage
*** WARNING ***  For security reasons, only system administrators should be
*** WARNING ***  allowed in the portage group.  Untrusted users or processes
*** WARNING ***  can potentially exploit the portage group for attacks such as
*** WARNING ***  local privilege escalation.