In linux I only see a /home/[[me]]
directory. However, I know there are at least 20+ other users (root, www-data, etc..).
How come some users don't have user directories - and is it possible to create new users without a home directory?
Many of these users are created as system users. On Debian/Ubuntu, you can do that with adduser --system
. If you only want to avoid creating a home dir (not creating a system user), you can use adduser --no-create-home
.
I'm sure, there's an equivalent for non-Debian systems (with useradd
etc). The useradd
manpage tells me:
-M Do not create the user's home directory
-r, --system Create a system account.