Disable Password for Sudo Users when Already Logged In
September 12, 2023•73 words
Command
sudo visudo
Enable or add these lines
# Existing line
root ALL=(ALL) ALL
# Line A: Existing line
%sudo ALL=(ALL) ALL
# Line B: Add or change the above line to:
%sudo ALL=(ALL) NOPASSWD:ALL
Important
Line A and line B must be in the above order, if line A is after, it overwrites the NOPASSWD option to empty and the line B that disables password makes no sense.