There are so many variants to adduser or useradd -- which is correct?

On CentOS release 5.11 (Final) I'm using adduser --create-home baz but somewhat prefer the way Ubuntu asks extraneous questions about contact information. On Ubuntu, just adduser desired_user_name sudo which is easier to remember -- at least for me.

Digital Ocean says to use adduser and usermod:

Use the usermod command to add the user to the wheel group.

usermod -aG wheel username

By default, on CentOS, members of the wheel group have sudo privileges.

Just handled differently?

(This is on Elastix 2.5 (asterisk) running on CentOS.)

  • 1
    As an aside, useradd is the POSIX way of adding users
    – fpmurphy
    Dec 27, 2016 at 10:59

1 Answer 1


You can use -G

For CentOS Doc


       List of additional (other than default) group names or group 
       numbers, separated by commas, of which the user is a member. The
       groups must exist prior to being specified here.

so you can do this with

useradd username -d <customer_home_dir_path> -G <group_names>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.