[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Debian-specific behavior: 'useradd -m' ?



(I realize this may be a faq, but this 'useradd -m' is hard to google...)

Summary:

Is there a more-portable way to add users to a system then useradd(8)?
Why does Debian's useradd(8) require a "-m" switch when other unix/linux systems that I have seen do not?


Details:

On non-Debian systems:

$ useradd myname

...creates an a login named "myname" with a home directory of /home/myname (or whatever pathname format the system conf/template files specify).

On at least some flavor of Debian systems (I tested with Debian3.1-based derivations), the home directory is *not* created unless one uses the "-m" switch as in:

$ useradd -m myname

Whenever I go add users now to systems, I first check to see if said system is a Debian one, then I make the choice above.  I'm not sure what "-m" does on non-Debian systems, if anything.

-Matt

Reply to: