When to use adduser or useradd

11,463

Solution 1

  1. There is no difference in the functions provided, just that useradd is a compiled binary, and adduser is a perl script. adduser is more user-friendly, so it could fit better for a beginner.

  2. Use adduser create a fully functional user on the system. The command will run tasks like creating home directory, creating a group for it, promting for password, etc. Beside that useradd will just create the user (ofcourse you can use switches, but the default is just the user creation).

  3. The two commands are not identical (adduser runs useradd and many other things).

Solution 2

useradd is native binary compiled with the system. But, adduser is a perl script which uses useradd binary in back-end.

adduser is more user friendly and interactive than its back-end useradd. There's no difference in features provided.

SOURCE

Share:
11,463

Related videos on Youtube

Maythux
Author by

Maythux

Love To Learn Love To Share

Updated on September 18, 2022

Comments

  • Maythux
    Maythux over 1 year

    The Question consist of three parts

    1. What are the differences between them
    2. When to use adduser or useradd
    3. and why there is more than one command for the same purpose