In the previous video I created an user using adduser command. To create an user I can use useradd command, too. What are the differences between this two commands?.
First, looking at the file containing all the users, I can see some differences between user david created with adduser in the previous video and the user rose created with useradd. At the end of the line bash shell is associated to user david. No shell is associated to user rose.
Another difference is that adduser command creates a HOME directory for the user.
Looking at the password file, we can see that there's an exclamation for the user rose. This exclamation means that no password has been set. The user cannot login to the system.
useradd is a binary program. We can't undestand its contents. If we print the contents of useradd we get a lot of strange symbols without any meaning to us.
adduser is an script and we can view and understand its contents. If you search inside the script, you can find calls to useradd command. adduser is sending the data entered by the user to useradd. useradd creates the user with the received information.
On this page of the site you can watch the video online Linux 02 Difference between useradd and adduser with a duration of hours minute second in good quality, which was uploaded by the user Miquel Boada Artigas 15 May 2019, share the link with friends and acquaintances, this video has already been watched 3,093 times on youtube and it was liked by 27 viewers. Enjoy your viewing!