LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux Username and password only ASCII? (https://www.linuxquestions.org/questions/linux-newbie-8/linux-username-and-password-only-ascii-150749/)

LogicMagic 02-26-2004 10:05 AM

Linux Username and password only ASCII?
 
1. Why are usernames and passwords only allowed to be in ASCII?
2. Why can't usernames be only numeric? Or start with underscore?
3. Why can't you code ASCII chars like in Windows? (Alt + 066)
4. How can you change the language before you enter a session?


I tried to install linux (Red Hat 9.0) on my laptop for my father in law who only speaks Russian. I chose to do the install in English (I don't speak much Russian) and put his GUI in Russian. I was doing fine until it asked for the Root password. It would not take alpha characters because they were in Russian... I gave a numeric password and was able to move on. Later, I was asked to create a user other than Root. I could not since it could not be a Russian username. (Nor could it be numeric hence question 2 above.)

I will reinstall to get the computer working but I would still like to know if Linux is an ASCII language only OS.

Thanks

Tinkster 02-26-2004 12:06 PM

Re: Linux Username and password only ASCII?
 
Hi, and welcome to LQ..


Quote:

Originally posted by LogicMagic
1. Why are usernames and passwords only allowed to be in ASCII?
Technically speaking they're not. Just useradd won't
let you create a numerical ID. However, if you first
create a user, and then change the name MANUALLY,
editing /etc/passwd, /etc/shadow and
mv /home/<ASCII> /home/<NUMERIC>
it will work just as you wish.

Quote:

2. Why can't usernames be only numeric? Or start with underscore?
See 1. Basically the same question.

Quote:

4. How can you change the language before you enter a session?
You can't - but then that's the same in every OS? :)

I tried to install linux (Red Hat 9.0) on my laptop for my father in law who only speaks Russian. I chose to do the install in English (I don't speak much Russian) and put his GUI in Russian. I was doing fine until it asked for the Root password. It would not take alpha characters because they were in Russian... I gave a numeric password and was able to move on. Later, I was asked to create a user other than Root. I could not since it could not be a Russian username. (Nor could it be numeric hence question 2 above.)

I will reinstall to get the computer working but I would still like to know if Linux is an ASCII language only OS.
[/QUOTE]
Even with him speaking Russian ... you're not
swapping key-caps between ASCII and Cyrillic
on the fly, are you? What would be the big deal for him
to learn an ASCII name based on 5 characters? :D


Cheers,
Tink

LogicMagic 02-26-2004 01:11 PM

Thanks for the prompt reply!

I guess my question should have been:

Why does useradd only allow ASCII passwords and requires an ASCII char at the beginning of the username?

If you have to md5 your password and edit the etc/password file every time, there is no Operating System, but a big hack. I started a long time ago, so I am not afraid, but GUIs are supposed to hide everything and make things easier. So what if you can work around the problem. A better solution is to remove the problem.

I should not be penalized for choosing Russian during the install process. That is my point. It is a bug if you ask me. Of couse, my father in law can choose an ASCII username, he will never know about this problem, but I hope to improve Linux for future users.

This could even be pitched as a Security upgrade, since passwords would be harder to crack :).

Just trying to make the free world a better place.

Tinkster 02-26-2004 02:25 PM

Quote:

Originally posted by LogicMagic
Why does useradd only allow ASCII passwords and requires an ASCII char at the beginning of the username?
Maybe to make life easier for admins, and avoid
confusion? :} And a numeric login name could
cause confusion with a numeric UID ...

Quote:

If you have to md5 your password and edit the etc/password file every time, there is no Operating System, but a big hack. I started a long time ago, so I am not afraid, but GUIs are supposed to hide everything and make things easier. So what if you can work around the problem. A better solution is to remove the problem.
I wasn't talking about MD5ing passwords, and the
password these days is in /etc/shadow, anyway.
I was talking about a userid that's numeric. As for
the Gooey bit - I couldn't care less. I'm happy to
do admin tasks in text mode, that way I can easily
script things, or do them through a 9.6KB connection
if need be...

As a rule of thumb you should assume that things
are the way they are for a good reason, the UNIX
way has matured over a LONG period of time. The
fact that it's different from what you'd expect probably
just means that your way of thinking is wrong.

Quote:

I should not be penalized for choosing Russian during the install process. That is my point. It is a bug if you ask me. Of couse, my father in law can choose an ASCII username, he will never know about this problem, but I hope to improve Linux for future users.
Well, then don't rant, grab kdm's or gdm's or xdm's source, and
build-in a locale-chooser...

Quote:

Just trying to make the free world a better place.
Whatever ... :}


Cheers,
Tink

LogicMagic 02-26-2004 02:54 PM

Sorry if I am ranting too much. I was not trying to do administration, but an installation. I understand I can make it better (and I may try), but before I do I should find out why it is the way it is. If it is solely because of inertia --it has always been this way-- that would not be a very good argument.

I finished reinstalling and now I find that I can't even have uppercase characters in the username. I realize I can put whatever I want if I do it by hand.

Who maintains a function like useradd? How would I go about proposing changes to it? I am sure it would be an easy change since I propose removing code (the restrictions) rather than to write my own. Would I need to change the password function too?

Tinkster 02-26-2004 03:30 PM

Quote:

Who maintains a function like useradd? How would I go about proposing changes to it? I am sure it would be an easy change since I propose removing code (the restrictions) rather than to write my own. Would I need to change the password function too?
There's various approaches, and various tools
out there ... the use of which depends on the
vendor of the respective distro. You may well
find that littleRedRidingHood and MDK use different
tools from Debian or Slack.

In my case (Slack 8.1) it's the package from
http://shadow.pld.org.pl/

You may have to have a look at
Code:

rpm -qi `rpm -qf `which useradd``
to find out which package you are using ...



Cheers,
Tink


All times are GMT -5. The time now is 12:09 AM.