LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-26-2004, 10:05 AM   #1
LogicMagic
LQ Newbie
 
Registered: Feb 2004
Distribution: RedHat 9.0 and Mandrake 8.2
Posts: 4

Rep: Reputation: 0
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
 
Old 02-26-2004, 12:06 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
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
 
Old 02-26-2004, 01:11 PM   #3
LogicMagic
LQ Newbie
 
Registered: Feb 2004
Distribution: RedHat 9.0 and Mandrake 8.2
Posts: 4

Original Poster
Rep: Reputation: 0
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.
 
Old 02-26-2004, 02:25 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
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
 
Old 02-26-2004, 02:54 PM   #5
LogicMagic
LQ Newbie
 
Registered: Feb 2004
Distribution: RedHat 9.0 and Mandrake 8.2
Posts: 4

Original Poster
Rep: Reputation: 0
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?
 
Old 02-26-2004, 03:30 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,965
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
username and password no go bmd Linux - Newbie 7 04-06-2005 08:26 PM
Common username/password on Linux and Windows Yalla-One Linux - Networking 1 03-16-2005 05:50 AM
username/password sailu_mvn Programming 5 12-21-2004 03:21 AM
UserName and Password luis8460 Red Hat 0 07-08-2004 04:45 AM
i forgot my username and password, how can i open my red hat linux? josephgiselle Linux - Software 2 06-29-2004 09:21 AM


All times are GMT -5. The time now is 09:59 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration