Sudo rule requiring passwords not working correctly prompting for root password instead of user's password in the following rule:
%groupname ALL=(root) ALL
Configuration of targetpw setting in the /etc/sudoers file:
Defaults targetpw
# In the default (unconfigured) configuration, sudo asks for the root password.
# This allows use of an ordinary user account for administration of a freshly # installed system. When configuring sudo, delete the two # following lines:
When targetpw is enabled, it's supposed to prompt for the root password in this scenerio:
%groupname ALL=(root) ALL
1 - Edit the /etc/sudoers file and comment out or remove the targetpw setting like below:
#Defaults targetpw
© 2025 One Identity LLC. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center