How to add a user to Wheel group?

9

2

I am trying to add a use to wheel group using in a Ubuntu server.

sudo usermod -aG wheel john

I get:

usermod: group 'wheel' does not exist

On my /etc/sudoers I have this:

>  cat /etc/sudoers
> # sudoers file.
> #
> # This file MUST be edited with the 'visudo' command as root.
> #
> # See the sudoers man page for the details on how to write a sudoers file.
> #
> 
> # Host alias specification
> 
> # User alias specification
> 
> # Cmnd alias specification
> 
> # Defaults specification
> 
> # User privilege specification root    ALL=(ALL) ALL %root   ALL=(ALL) NOPASSWD: ALL
> 
>     %wheel  ALL=(ALL) NOPASSWD: ALL

Do I have to do groupadd of wheel?

Natasha Thapa

Posted 2012-10-13T15:18:49.483

Reputation: 367

Question was closed 2012-10-14T15:42:16.763

3It is pretty clear what the need is, if sudoers in configured for the %wheel group, I need to add my user to that group, typically by adding the user id or name to the list on the 'wheel' entry in /etc/group – Gerry Gleason – 2017-03-22T04:32:29.573

2

Does the group "wheel" exist? Try grep wheel /etc/group. Another thing, why are you trying to add someone to the wheel group? Beware the XY problem.

– terdon – 2012-10-13T15:21:30.553

grep wheel /etc/group doen't find anything – Natasha Thapa – 2012-10-13T15:24:22.657

So, the wheel group does not exist. Again, what is it you are really trying to do? – terdon – 2012-10-13T15:25:04.200

i am just getting used to with ubuntu, i am new with unix roles and user – Natasha Thapa – 2012-10-13T15:26:01.907

does that mean i need to do groupadd wheel? my assumpution was wheel is a bulit in group – Natasha Thapa – 2012-10-13T15:27:19.207

1

OK, please update your question explaining why you need to add a user to the wheel group. This really sounds like a case of the XY problem. In general, yes, in order to add a user to a group, you need to create the group first.

– terdon – 2012-10-13T15:28:19.720

3ok, my assumptuion was wheel and admin are bulit in groups – Natasha Thapa – 2012-10-13T15:28:55.133

Wheel is FreeBSD admin group – Boris Ivanov – 2014-04-17T08:46:16.820

No answers