Add check for correct case of username #168
Replies: 2 comments 2 replies
-
Wait, this is going to sound silly but, 20 years of using Linux and I think this is the first time I've ever been pointed out that Linux doesn't support upper-case usernames.. If this is the case (which it most likely is) we should for sure do a check/warning or even default to lower-case the usernames.. I'm transferring this to the issue section and if you wish you're welcome to add a PR and I'll merge it. Edit: weird, can't transfer this.. I used to be able to transfer discussions to issues oÔ |
Beta Was this translation helpful? Give feedback.
-
Note to self: This was solved in PR #170. Good job on this one! |
Beta Was this translation helpful? Give feedback.
-
Hi! I'm very glad that Arch is finally trying to make a user-friendly installer that it is simple and powerful. But there are small flaws.
When I tried to set up the first user, I entered my username in a non-lower case and completely forgot that this isn't allowed in Linux. However, the script didn't gave me any warnings and continued its work further.
At the end of the installation, after
Enabling service gdm
, I received an SysCallError exception with messageuseradd: invalid user name
and the installation was not completed. Here are an example of issue:I think it would be great to add a little case check in functions like this: ask_for_superuser_account and ask_for_additional_users.
For example, we can make our loop endless until the user enters the username correctly:
but this solution adds unnecessary nested if..else branch, so we can raise an exception:
I can't say for sure that these solutions are great for performance or code quality, but I think that this check is needed in the script so that any users who wanted to install Arch in this way wouldn't be confused after a similar error. Hope this helps in some way
Beta Was this translation helpful? Give feedback.
All reactions