Ubuntu server useradd vs adduser shell assingment?

I noticed with useradd the shell is /bin/sh and adduser is /bin/bash. Why the difference? Is one better then the other?

Brent, the useradd command is a user management built-in command present in all Linux distros which is a low-level command for adding users in the system and has limitations. On the other hand, the adduser command is a more sophisticated user management command which Ubuntu uses as do other Linux developers which incorporates a Perl script to process the addition of users as well as their home directories and the like. When adduser is invoked in the Terminal, useradd is actually running in the background, but the Perl script takes care of some of the more sophisticated functionality for the Linux sysadmin.

^ great answer

In regards to the shell though, that just means one was tested on /bin/sh and the other /bin/bash. Sometimes it even comes down to the preferences of whomever wrote the script.

1 Like