Dear All,
During installation of Rocky Linux v10, i mistakenly checked (ticked), Add admin privileges to this user account (wheelgroup membership).
β usermod -G wheel -r username or etc/sudoers ???
Confused ,as etc/sudoers, shows it has to be read only even though i accessed file as root.
How do i remove the user (testuser1) from the root/admin rights please? 
I donβt want testuser1 to install any programs.
Cheers
You can do it with:
gpasswd -d testuser1 wheel
and verify with:
grep wheel /etc/group
since here it will show who is a member of wheel group.
2 Likes
@iwalker U are Awesome - God bless U 
2 Likes
getent group wheel
does also show members of group wheel. However, neither lists accounts that have wheel as primary group.
id testuser1
does list groups that account testuser1 is member of.
It is possible to use the usermod, but then one has to write all the other groups:
# id me
uid=1000(me) gid=1000(me) groups=1000(me),10(wheel),135(mock),1009(slurm)
# moduser -G mock,slurm me
# id me
uid=1000(me) gid=1000(me) groups=1000(me),135(mock),1009(slurm)
Do not edit the /etc/sudoers
- Group memberships of accounts are not there; account got admin vie becoming member of group
- There is directory
/etc/sudoers.d where you can add files with additional sudoers rules
Thanks, @iwalker the gpasswd had somehow eluded me (for years).
What else might lurk in /usr/{bin,sbin} β¦ 
2 Likes