The account name must begin with an alphabetic character and the rest of the string should be from the POSIX portable character class ([A-Za-z_][A-Za-z0-9_-.]*[A-Za-z0-9_-.$]).
Which tells the same as the error message.
The man page of the passwrd file says:
name
This is the user’s login name. It should not contain capital letters.
Which is quite different
I do not have Ubuntu at hand here, but could you check what it’s man page says. And if those characters are realy stored in the password file as UTF-8 encoded Unicode?
On 03/19/2013 03:46 PM, tosiara wrote:
>
> Can anybody explain - why openSUSE has this restriction?
not all possible openSUSE system languages consider the kinds letters
you are using as “legal” for file or directory names…what system
language are you using?
that is, what do you see if you put this into a user terminal:
Sorry, some misunderstanding, but listing what the Ubunto says is no amswer to my question how it is stored internaly in the /etc/passwd file. I guess that would involve an od of it.
Also, what says the man page (and when it is in Russian, please tell us what you understand of it.
$ mail
No mail for вася2
$ telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 extsmtp.test.lan ESMTP
helo localhost
250 extsmtp.test.lan
mail from:<вася2@extsmtp>
250 2.1.0 Ok
rcpt to:<вася2@extsmtp>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
Subject: Тест
From: вася2 <вася2@extsmtp>
To: вася2
абвгдеёжз
.
250 2.0.0 Ok: queued as EDCA32351B
quit
221 2.0.0 Bye
Connection closed by foreign host.
$ mail
Heirloom mailx version 12.5 7/5/10. Type ? for help.
"/var/spool/mail/вася2": 1 message 1 new
>N 1 вася2@extsmtp.test Wed Mar 20 10:11 16/555 Тест
? type
Message 1:
From вася2@extsmtp.test.lan Wed Mar 20 10:11:10 2013
X-Original-To: вася2@extsmtp
Delivered-To: вася2@extsmtp.test.lan
Subject: Тест
From: вася2 <вася2@extsmtp.test.lan>
To: вася2@extsmtp.test.lan
Date: Wed, 20 Mar 2013 10:10:07 +0200 (EET)
абвгдеёжз
?
As Carlos suggested, the file tool will tell you if it finds legal UTF-8 byte combinations in a file it otherwise decides as being text (but always remember, file does “only” make intelligent guesses).
I could have started to decode the hex you offered me, but unless you reaaly want me to do that, I think this says it. Try
file /etc/passwd
If all software is able to handle UTF-8 correctly is something different. But as UTF-8 is allready some time supported, I guess the majority of system software can do.
YaST apperently still does not allow this. I real wonder how people in Cyrilic, Arabic, etc. countries using openSUSE do enter their users using YaST (or even useradd).
Looking around with Google it seems that different distros have different ideas about the alowed characters.
The main thing to worry about now is if you laid a bomb somewhere that will go off (unexpected) in the future. When any software using the username is not UTF-8 ready. Difficult to predict. But keep it in mind.
BTW, I wonder if this would be worth a bug report: Can not enter Cyrilic usernames through YaST and or useradd. Simply for finding out what the answer is. The answer could shed light on possible pitfals.
What I miss there is what you changed in /etc/login.defs.
I do not know what exactly you did, but does it allow all Unicode characters (except the few that are not allowed because they will create havoc when used in a username like : and @), or did you only solve it for Cyrilic?
I agree, using unicode in a global newtork is a bad idea (there are chars that look similar but has different codes, like ‘c’ and ‘с’). But I was only looking for a solution for inside-company only. And I’m happy that my favorite Linux does offer the choice to me!