Celeb Glow
news | March 19, 2026

Cannot add a user account with numerical username - useradd: group '11' does not exist

I'm an amateur Kubuntu user, and have much to learn.

I am trying to create a user account which are named after numbers. I have sudo privileges and I tried it on the root account as well.

Apparently, to add such an account, you have to use the command:

sudo adduser --force-badname

and then the number.

I tried this, and it worked for 10 accounts. During the eleventh, it failed and gave me an error message:

$ sudo adduser --force-badname 11
Allowing use of questionable username.
Adding user `11' ...
Adding new group `11' (1010) ...
Adding new user `11' (1010) with group `11' ...
useradd: group '11' does not exist
adduser: `/usr/sbin/useradd -d /home/11 -g 11 -s /bin/bash -u 1010 11'
returned error code 6. Exiting.

Eventually, I changed my command to useradd to add the account, and it claimed:

useradd: group 11 exists - if you want to add this user to that group, use -g.

So I typed:

$ useradd -g 11
useradd: group '11' does not exist

So I resorted to the original adduser command: adduser --force-badname 11Allowing use of questionable username.

adduser: The group `11' already exists.

At this point, I was angry, but I used the groupdel command to delete group 11. I tried groupdel 11. After confirming the command worked, I went on the adduser command, and on the root account I typed adduser --force-badname 11.

And received the same error message as when I started!

Allowing use of questionable username.
Adding user `11' ...
Adding new group `11' (1010) ...
Adding new user `11' (1012) with group `11' ...
useradd: group '11' does not exist
adduser: `/usr/sbin/useradd -d /home/11 -g 11 -s /bin/bash -u 1012 11'
returned error code 6. Exiting.
7

1 Answer

Don't do this, instead use a username which starts with a characters like u11.


Here is what's happening:

You are trying to create a user named 11, so a group will be created named 11 at the same time as your user's primary group.

This newly created group will get an id bigger that of > 1000 like: 1003 which in your /etc/group file its line going to be: 11:x:1003.

While adding this new user useradd tries to add it to its primary group which is 11, however when doing this, it thinks that the 11 is a group id so it complains that there is no such group with the id of 11.

  • When it says "group 11 exists", it means you have a group named "11", and
  • When it says "group '11' does not exist", it means that I can't find any group with the id of "11".

Why it worked for first 10 account

Because by default there are some groups with the ID of 0 to the 10 in a Ubuntu system. so it assign your users to these groups and does not complain about it. However with the 11, you've got a group named 11 but no group with the id of 11.

Workaround

So as muru said it's just the start of your problems, do not do this. however if you insist to fix the issue you should find the group id and use that:

$ grep ^11 /etc/group
11:x:1003
$ sudo useradd 11 -g 1003

Do not forget to use usermod to change the first 10 users group id too.

8

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy