useradd program has been deprecated in favor of
useradd is a low level utility for adding users. On Debian,
administrators should usually use adduser(8) instead.
adduser is a friendlier frontend to
useradd and will do things like create user directories by default. When you run it with only a username as an argument, you will be prompted to provide additional information such as the password:
$ sudo adduser testuser
Adding user `testuser' ...
Adding new group `testuser' (1002) ...
Adding new user `testuser' (1002) with group `testuser' ...
Creating home directory `/home/testuser' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for testuser
Enter the new value, or press ENTER for the default
Full Name :
Room Number :
Work Phone :
Home Phone :
Is the information correct? [Y/n]
In general, you should always use
adduser instead of
useradd since this will also set up the required groups automatically. As explained in
adduser and addgroup add users and groups to the system according to
command line options and configuration information in
/etc/adduser.conf. They are friendlier front ends to the low level
tools like useradd, groupadd and usermod programs, by default choosing
Debian policy conformant UID and GID values, creating a home directory
with skeletal configuration, running a custom script, and other fea‐