Bug 967245

Summary: CRIT anaconda: Error when creating new user: name contains non-ASCII characters
Product: [Fedora] Fedora Reporter: Reartes Guillermo <rtguille>
Component: anacondaAssignee: David Shea <dshea>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 19CC: anaconda-maint-list, dshea, g.kaviyarasu, jonathan, mitr, mkolman, sbueno, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-20.9-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-30 22:05:49 UTC Type: Bug
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
anaconda.log
none
program.log
none
storage.log
none
packaging.log none

Description Reartes Guillermo 2013-05-26 00:20:04 UTC
Created attachment 753192 [details]
anaconda.log

Description of problem:

If an user name with unicode character is specified at user creation screen,
anaconda silently finishes the installation without reporting that no user was
created due to the unicode character in the username. 

Version-Release number of selected component (if applicable):
F19b RC4 (19.30-1)

How reproducible:
always

Steps to Reproduce:
1. Customize Installation Settings
2. Start Installing
3. Set Root password
4. Create an user with an unicode character in the username.
5. Installation finishes ok. (logs shows that no user was created).
6. Upon reboot, and inspection, one can the user was not created.

Actual results:
failure to report that the user will not be created.

Expected results:
either make sure that it is created, or refuse to do it if the 
underlying toos do not support it (invalid username).

Additional info:

21:08:06,626 INFO anaconda: Creating users
21:08:06,627 INFO anaconda: created new libuser.conf at /tmp/libuser.aGAqyX with instPath="/mnt/sysimage"
21:08:06,834 CRIT anaconda: Error when creating new user: name contains non-ASCII characters
21:08:06,838 ERR anaconda: User admin<U+200F> already exists, not creating.

Comment 1 Reartes Guillermo 2013-05-26 00:20:30 UTC
Created attachment 753193 [details]
program.log

Comment 2 Reartes Guillermo 2013-05-26 00:21:00 UTC
Created attachment 753194 [details]
storage.log

Comment 3 Reartes Guillermo 2013-05-26 00:21:45 UTC
Created attachment 753195 [details]
packaging.log

Comment 4 Miloslav Trmač 2013-06-03 17:05:46 UTC
Thanks for your report.


Brian, is there anything to suggest this is a problem in libuser?

> 21:08:06,834 CRIT anaconda: Error when creating new user: name contains non-ASCII characters
> 21:08:06,838 ERR anaconda: User admin<U+200F> already exists, not creating.
So this suggests that libuser has reported an error, but anaconda is handling it incorrectly.  In particular kickstart.User.execute() logs the second ERR if createUser fails for any reason; then the information about the failure is ignored.

(Also utils/handle-sshpw is ignoring the failure completely.)


The user name restrictions are intentional, and at least for F19 are definitely not changing.


Anaconda
* Really needs to handle libuser error returns in a way that is visible to the user
* Might consider doing user-friendlier validation in advance; see isUserGroupNameOk in /usr/share/system-config-users/userGroupCheck.py .