11

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?

11
  • 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
    Oct 13, 2012 at 15:21
  • 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
    Oct 13, 2012 at 15:28
  • 3
    ok, my assumptuion was wheel and admin are bulit in groups Oct 13, 2012 at 15:28
  • 5
    It 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 Mar 22, 2017 at 4:32
  • 1
    @PhamX.Bach yes, thank you, I am well aware of the wheel group, which is why I also know it isn't used on Ubuntu where you would add a user to the sudo group instead, hence my question to the OP to understand if the actual objective here was to have a user be able to run sudo or if they need the actual group wheel to be added to the system for some other reason.
    – terdon
    Jun 13 at 8:57

0

Browse other questions tagged or ask your own question.