Disable Password for Sudo Users when Already Logged In

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.


You'll only receive email when they publish something new.

More from 19411
All posts