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
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
reported to upstream https://alioth.debian.org/tracker/index.php?func=detail&aid=311367&group_id=30580&atid=411478
creating userid in utf8 will add difficulty in processing it @ console level(IM), but User Full Name we can create with UTF-8