useradd commands work differently.
Simply creates the user. It doesn't even ask you for a new password. It also does not create the home directory for this user. All these things you have to do manually after creating the user.
OR you can tell it when running the
useradd command. For example, the command
useradd -d /home/username -m username, includes creation of a home directory for this user.
Set the password after creating user, by
root@ubuntu-server:~# adduser username
Adding user `username' ...
Adding new group `username' (1006) ...
Adding new user `username' (1006) with group `username' ...
Creating home directory `/home/username' ...
Copying files from `/etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for username
Enter the new value, or press ENTER for the default
Full Name : User name
Room Number : 405
Work Phone : 555-412-5555
Home Phone : 412-555-5555
Is the information correct? [Y/n] y
adduser command does everything automatically for you as shown here.
adduser command is much more convenient for creating users. The reason
useradd is provided even when there is
adduser is that not all distributions come with