Score:3

How can I bypass the Ubuntu install username requirements?

in flag

While installing Ubuntu 21.04 for the first time, it asked me to pick a username. It wouldn't let me start my username with a capital letter. Is it possible to bypass this restriction during install?

A few workarounds I've tried:

  • Using sudo adduser Testname --force-badname (This method worked, but it still prompted me for a username during install.)
  • Editing NAME_REGEX in /etc/adduser.conf to allow for capitals.
Irsu85 avatar
cn flag
Linux uses all-lowercase letters for usernames, thats not specific to Ubuntu
Paulky avatar
in flag
@Irsu85 I realize that, but I'm asking how to accomplish this action on Ubuntu specifically.
ilkkachu avatar
co flag
@Irsu85, Linux (the kernel) absolutely doesn't care what your usernames are like, or if there even exist usernames in the first place. Some software might care to some extent, some might care less, and some might make some usernames unusable (e.g. ones starting with digits, ones with spaces in the middle). With the regular `/etc/passwd` format, a hard limitation is that a username can't contain a colon (`:`). But according to https://systemd.io/USER_NAMES/ e.g. Redhat/Fedora allows uppercase, and also Debian uses `Debian-exim` as the username for the exim mail daemon.
Score:5
cn flag

Is it possible to bypass this restriction during install?

No, you can not bypass this from a regular installation.

Using a capital in user names is bad though. It will break compliance with Windows in general and specific Linux software: "Username" and "username" are the same in Windows and also treated the same in Mail, FTP, LDAP, Active Director (and no it is not limited to this).

Using a full name in capitals will enable case folding. You would need to escape every capital letter wherever you use a capital. That will break your system.


To do this you would need to recreate a new Live session yourself and recompile for adduser to accept --force-badname as an option when creating a user. It is not only bad to do this but also a waste of time as you can easily do this AFTER installation with the command you already know sudo adduser Testname --force-badname.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.