User not in group wheel can't sudo with password

I have configured ‘/etc/sudoers’ to activate group wheel.

##
## User privilege specification
##
root ALL=(ALL) ALL

##
## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL) ALL

##
## Same thing without a password
%wheel ALL=(ALL) NOPASSWD: ALL

##
## Read drop-in files from /etc/sudoers.d
## (the '#' here does not indicate a comment)
#includedir /etc/sudoers.d


I have put one user in the group wheel, and it is working as expected for that user.

The problem occure when a user not in that group try to use sudo.
Example 1
normal user logged : user_test
user in group wheel : super_user


:~> sudo blkid
[sudo] passord for super_user:**************
user_test is not in the sudoers file. This incident will be reported.
:~> 

Example 2
user logged : super_user
user in group wheel : super_user


:~> sudo blkid
/dev/sda3: LABEL="WINDOWS_10" UUID="A6B4ED96B4ED696F" TYPE="ntfs" PARTLABEL="Microsoft basic data" PARTUUID="b197e1f7-fa83-42a7-9916-18b80497a915"
/dev/sda4: LABEL="MS_RESERV1" UUID="96625C83625C6A4F" TYPE="ntfs" PARTUUID="44843f03-1e2e-453f-871e-805eb5298163"
/dev/sda5: LABEL="MS_RESERV2" UUID="700262BC026286C6" TYPE="ntfs" PARTLABEL="Microsoft reserved" PARTUUID="8547c1fd-01cd-4088-a587-d9f6057638aa"
/dev/sda6: LABEL="MS_RESERV3" UUID="D25CCA125CC9F0F1" TYPE="ntfs" PARTLABEL="Microsoft reserved" PARTUUID="bbad3d9a-6d15-4596-ae9b-01766847cc6b"
/dev/sda7: LABEL="WIN_DSK_D" UUID="923C8E4E3C8E2CF3" TYPE="ntfs" PARTLABEL="Microsoft basic data" PARTUUID="7f500d78-55ef-4b7b-8772-4c9430a5be05"
/dev/sda8: LABEL="LNX_SLASH" UUID="14d9d467-fe36-4f53-868e-bc6b27a59255" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="e52234bf-e3b3-49b5-825a-4455fc504de5"
:~>

1°)
Why sudo is asking the password of the user in the group wheel and not the password for root.

2°)
I would like normal user (user not in the group wheel) to use sudo with the root password ( when they know it )

Any help is welcome.

I have never been a fan of “sudo” so I don’t have experience with this.

Your user who knows the root password should be able to use “su” to become root.

This description seems to match the options runaspw and runas_default. Do you have these settings in any files under /etc/sudoers.d/?

Add the user on sudoers as the message indicates. Instead of %wheel use user_test. Or create another group and add user_test to this group. This won’t have the NOPASSWD directive.

You might want to take another look at man sudo.

Default behavior of openSUSE is to ask for target user password. Before changing default settings it makes sense to at least understand them.

I would like normal user (user not in the group wheel) to use sudo with the root password ( when they know it )

If you insist …

ALL,!%wheel ALL=(ALL) ALL

This description matches default sudo behavior without anything in /etc/sudoers(.d). Default /etc/sudoers in openSUSE sets targetpw option.