Bug 479974 - useradd not accepting UTF8 string (unable to create username in local language/script)
useradd not accepting UTF8 string (unable to create username in local languag...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: shadow-utils (Show other bugs)
rawhide
All Linux
low Severity medium
: ---
: ---
Assigned To: Pravin Satpute
Fedora Extras Quality Assurance
: i18n
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-14 06:38 EST by Pravin Satpute
Modified: 2009-02-03 01:33 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-02-03 01:33:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Pravin Satpute 2009-01-14 06:38:27 EST
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 04:12:24 EST
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 01:33:07 EST
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.