I am using AWS Linux AMI2, I added
ec2-user ALL=(ALL) ALL and saved the file.
Now when I run any command with
sudo it displays
[sudo] password for ec2-user:
How to reset this file?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
By default, sudo requires that a user authenticate him or herself before running a command.
This behavior can be modified via the NOPASSWD tag.
For a single user, try
USERNAME ALL=(ALL:ALL) NOPASSWD:ALL
We can also modify the syntax to allow specific commands like
USERNAME ALL= NOPASSWD: /bin/kill, /bin/ls
Suoders manual has more details covering this topic