Command-Line – How to Add a User Called ‘admin’

addusercommand line

I need to add an user called "admin". When I type:

# adduser admin

I get:

adduser: The group 'admin' already exists.

So, I guess, by default, adduser is trying to create an "admin" group that already exist at the same time as creating the "admin" user. Reading adduser man page I've seen -N option to avoid goup creation. I tried this:

adduser -N admin

With the same result. How can I create an "admin" user?

Best Answer

As steeldriver suggest, this works:

# adduser admin --ingroup sudo