"sudo" group mysteriously gone?

Thanks for your time in reading my post.

I have a user that lost sudo privileges:

Sorry, user me is not allowed to execute '/usr/bin/ifconfig eno1 down' as root on pc

So I did:

usermod -a -G sudo me

But I get:

usermod: group 'sudo' does not exist

I tried wheel also with no luck. Maybe I have misconfigured something, or is this maybe a common problem on Manjaro from some update awhile ago? It’s been going on in my vm for a good while now, making me use su to do basic tasks. Would be really nice to get solved. Thank you!

@Buck Crazy… however should be solved with:

sudo groupadd wheel && sudo usermod -aG wheel $USER

we dont use group sudo

Could you provide the output of sudo -l while being user me?


:wink:

Thanks for the replies.

$ sudo -l

Runas and Command-specific defaults for me:
Defaults!/etc/ctdb/statd-callout !requiretty

User me may run the following commands on pc:
(ALL) NOPASSWD: /usr/bin/refresh-network

The refresh-network command is a simple one I’ve been trying to install (the problem occurred beforehand) to fix an issue for manual network configuration.

I tried this, @megavolt, but it did not seem to change anything. Should I need to reboot?

# groupadd wheel && sudo usermod -aG wheel me
> groupadd: group 'wheel' already exists
# groupadd wheel
> groupadd: group 'wheel' already exists
# usermod -aG wheel me
> <no reply>
# exit

I did not try doing it as sudo since sudo is nonfunctional, I opted for root. Was that a mistake?

@Buck

  1. Change to another TTY -> CTRL+ALT+F3
  2. Login as root
  3. Edit sudoers file: nano /etc sudoers
  4. Look for this config: %wheel ALL=(ALL) ALL and uncomment it. Save it.
1 Like

If I may diverge the conversation for a moment, I have found something strange that perhaps you can shed some light on. In moving to edit /etc/sudoers (I think you meant a slash over a space above?) I came upon this line:

@includedir /etc/sudoers.d

So I went into that directory and found a file (ctdb) containing these lines:

Defaults!/etc/ctdb/statd-callout        !requiretty

rpcuser         ALL=(ALL)       NOPASSWD: /etc/ctdb/statd-callout

The rpcuser caught my eye. Is this normal to have? I do not remember installing any such “RPC” system or “STATD” and I wonder if I may have picked up a bug?

$ sudo pacman -Qo /etc/sudoers.d/ctdb 
/etc/sudoers.d/ctdb is owned by samba 4.13.3-1

It’s part of the samba package.

You seem to have “borked” your sudo yourself by restricting sudo usage to that command alone…

Yes because nothing should be part of the root group…

To fix your sudo usage follow what megavolt said:

If you can’t find that line in (4) then add it at end of the file.

After doing that post output of sudo -lU me.