Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 906099 - Error message for non existent user specified in PORTAGE_USERNAME says the wrong user
Summary: Error message for non existent user specified in PORTAGE_USERNAME says the wr...
Status: UNCONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Configuration (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-10 23:33 UTC by throwd
Modified: 2023-05-16 22:01 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.