Bug 2196906

Summary: Not all system usernames are reserved in some editions of Fedora
Product: [Fedora] Fedora Reporter: Julian Webb <email>
Component: anacondaAssignee: Vladimír Slávik <vslavik>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 38CC: anaconda-maint-list, vponcova, vslavik, w
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-10 17:27:14 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Attempting to use the Root username in Fedora Server 38
none
Attempting to use the Operator username in Fedora Server 38 none

Description Julian Webb 2023-05-10 18:21:30 UTC
In Fedora Server 38 and Fedora KDE 38 installer, it appears the only reserved usernames are: root, bin, daemon, and system. If you attempt using any other system usernames, e.g. "operator", the installer will silently fail to create a user account and create a softlock upon first boot. 

Fedora Workstation 38 does not seem to have this problem, likely because you create the user after install and has checks against existing accounts. I have not tested against other editions.

While it's unlikely the average user would create an account with a username like "lp", "abrt", or "dbus", there are some that an average user might try using. Hopefully there is a simple way to make it more average user proof.

Reproducible: Always

Steps to Reproduce:
1. Load Fedora Server 38 or Fedora KDE 38 Installer
2. Configure user account option to use a system reserved username other than "root", "bin", "daemon", or "system" (e.g. "mail", "nobody", "operator", "ftp")
3. Continue the installer normally, no errors should be reported
4. Reboot into new operating system
5. Attempt to log in with configured user account
Actual Results:  
Installer does not stop the use of username
User account does not exist on new installation

Expected Results:  
Installer stops use of system username

Comment 1 Julian Webb 2023-05-10 18:22:36 UTC
Created attachment 1963825 [details]
Attempting to use the Root username in Fedora Server 38

Comment 2 Julian Webb 2023-05-10 18:23:01 UTC
Created attachment 1963826 [details]
Attempting to use the Operator username in Fedora Server 38

Comment 3 Vladimír Slávik 2023-05-30 14:44:52 UTC
Julian, thank you for the report! Fortunately this is easy to fix: https://github.com/rhinstaller/anaconda/pull/4799 Feel free to provide more user names to block.