usermod: group 'sudo' does not exist in CentOS
34,333
The group in CentOS isn't called sudo
. It's call wheel
.
As root:
usermod -aG wheel rdegamma
You then need to run visudo
and uncomment the below line in the sudoers file if you haven't already:
%wheel ALL=(ALL) ALL
Have the user start a new shell session to enter their password for sudo
.
Author by
Nicholas Saunders
Updated on September 18, 2022Comments
-
Nicholas Saunders over 1 year
I want to grant a user sudo access.
I suppose mainly I want to grant privileges to install software, and am not quite sure how to this in CentOS:
https://linuxize.com/post/how-to-add-user-to-sudoers-in-centos/
wheras in Ubuntu the option, at least as I recall, is:
sudo adduser foo sudo
to add user foo to sudo. I'm also curious as to why this isn't available in CentOS -- perhaps it's not fine grained enough?
[nsaunders@rolly ~]$ [nsaunders@rolly ~]$ sudo usermod -aG sudo rdegamma usermod: group 'sudo' does not exist [nsaunders@rolly ~]$