I just installed Ubuntu 24.04 and I've already hit a problem of things changing with no notice.
On Ubuntu 20.04, when I created a system user using adduser
, it created a home folder for that user:
$ sudo adduser --system --group barney
Adding system user `barney' (UID 114) ...
Adding new group `barney' (GID 119) ...
Adding new user `barney' (UID 114) with group `barney' ...
Creating home directory `/home/barney' ...
Now, in Ubuntu 24.04, the exact same command suddenly works a different way:
$ sudo adduser --system --group barney
info: Selecting UID from range 100 to 999 ...
info: Selecting GID from range 100 to 999 ...
info: Adding system user `barney' (UID 112) ...
info: Adding new group `barney' (GID 112) ...
info: Adding new user `barney' (UID 112) with group `barney' ...
info: Not creating `/nonexistent'.
No home folder is created. Okay, fine, one of the thousand paper cuts of using Linux that I've gotten calloused to.
Can I correct this by manually adding the /home/barney/
directory? That is, if I run
$ sudo mkdir /home/barney
$ sudo chown barney:barney /home/barney
$ sudo chmod 775 /home/barney
is that precisely the same as /home/barney/
having been created as the home folder for barney
at the time the user was added, or are there further complications under the hood that I'm not aware of?
If you research the "usermod" command, there seems to be an option to create a missing home directory that way:
I have not tried it myself, but have used usermod to fix incorrect groups and to match user IDs across servers.