7

When I use the adduser command on fedora, it's not aksing for password or fullname. It's working exactly like useradd.
I don't understand why.

[hugues@localhost ~]$ sudo adduser user1
[hugues@localhost ~]$ sudo useradd user2

And it creates two users in /etc/passwd

user1:x:1004:1010::/home/user1:/bin/bash 
user2:x:1005:1011::/home/user2:/bin/bash

2 Answers 2

11

in fedora there is only useradd command, adduser is just a symlink to useradd.

you can check that with the following command:

ls -ld /usr/sbin/adduser

the output of the command:

[root@fedora28 ~]# ls -ld /usr/sbin/adduser
lrwxrwxrwx. 1 root root 7 Feb 6 05:37 /usr/sbin/adduser -> useradd
4
  • Could you please add the output of the command in your answer? (on Ubuntu ls -ld /usr/sbin/adduser and ls -ld /usr/sbin/useradd display files with different sizes, so I'm curious about the output on Fedora)
    – A.L
    Commented Jun 2, 2018 at 17:37
  • @A.L adduser is a symlink to useradd.
    – mattdm
    Commented Jun 4, 2018 at 14:56
  • I had some vague recollection of there once-upon-a-time being a separate adduser command, and looked in the package changelog, which includes: Mon Oct 27 1997: - obsolete adduser. I guess I'm getting old. :)
    – mattdm
    Commented Jun 4, 2018 at 14:58
  • 1
    @A.L i have added the output of ls -ld to the answer Commented Jun 5, 2018 at 12:49
0

useradd is the only command of them two which is available on all Unix style systems (I know of).

On Debian and its derivatives, adduser is a wrapper to useradd which adds some comfort like generating a same named group by default.

In Fedora, they are the same.

1
  • 5
    useradd is not a POSIX utility, neither is adduser.
    – Kusalananda
    Commented Jun 2, 2018 at 13:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .