2

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?

1 Answer 1

4

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.
3
  • Ok, so then Ubuntu/Debian has two types of users - system and normal? Where can I find a listing of all system users then?
    – Xeoncross
    Mar 21, 2010 at 18:28
  • 2
    @Xeoncross: All users are the same - they're just used for different purposes. A "system" user account is one which doesn't belong to a person, but instead to a program. This is an Unix convention, not Debian-specific. Mar 21, 2010 at 18:51
  • 1
    From the useradd manpage: System users will be created with no aging information in /etc/shadow, and their numeric identifiers are choosen [sic] in the SYS_UID_MIN-SYS_UID_MAX range, defined in /etc/login.defs, ... Mar 21, 2010 at 19:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .