Bug 479974 - useradd not accepting UTF8 string (unable to create username in local language/script)
Summary: useradd not accepting UTF8 string (unable to create username in local languag...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: shadow-utils
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Pravin Satpute
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-14 11:38 UTC by Pravin Satpute
Modified: 2009-02-03 06:33 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-02-03 06:33:07 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Pravin Satpute 2009-01-14 11:38:27 UTC
Description of problem:
useradd giving error while inputting name in local language Devanagari


Version-Release number of selected component (if applicable):
shadow-utils-4.1.2-10

How reproducible:
everytime

Steps to Reproduce:
1.become root
2.try to add user using useradd command
3.input any user name in UTF 8 string, says प्रविण
4.it is giving error invalid username
  
Actual results:
we cant create user in our own script/language

Expected results:
it should be get accepted, person should able to create user in his own script/language


Additional info:
looks it is not enabled for UTF8

Comment 1 Pravin Satpute 2009-01-23 09:12:24 UTC
the problem in present in good_name function its check for ascii characters

if (!*name || !((*name >= 'a' && *name <= 'z')
             || (*name >= 'A' && *name <= 'Z')
             || (*name >= '0' && *name <= '9')
             || *name == '_' || *name == '.'))
		return 0;

	while (*++name) {
		if (!(  (*name >= 'a' && *name <= 'z')
		     || (*name >= 'A' && *name <= 'Z')
                     || (*name >= '0' && *name <= '9')
                     || *name == '_' || *name == '.' || *name == '-'
                     || (*name == '$' && *(name + 1) == '\0')))
			return 0;

but if we input U+0915, it UTF-8 =  E0 A4 95
since E0 it is not valid, 
useradd not adding username saying its invalid username

Comment 3 Pravin Satpute 2009-02-03 06:33:07 UTC
creating userid in utf8 will add difficulty in processing it @ console level(IM), but User Full Name we can create with UTF-8


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