Bug 967245 - CRIT anaconda: Error when creating new user: name contains non-ASCII characters
Summary: CRIT anaconda: Error when creating new user: name contains non-ASCII characters
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 19
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: David Shea
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-05-26 00:20 UTC by Reartes Guillermo
Modified: 2014-01-30 22:05 UTC (History)
8 users (show)

Fixed In Version: anaconda-20.9-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-30 22:05:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
anaconda.log (42.88 KB, text/plain)
2013-05-26 00:20 UTC, Reartes Guillermo
no flags Details
program.log (32.23 KB, text/plain)
2013-05-26 00:20 UTC, Reartes Guillermo
no flags Details
storage.log (90.41 KB, text/plain)
2013-05-26 00:21 UTC, Reartes Guillermo
no flags Details
packaging.log (719.86 KB, text/plain)
2013-05-26 00:21 UTC, Reartes Guillermo
no flags Details

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 .


Note You need to log in before you can comment on or make changes to this bug.