Why does sudo ask for a password in terminal?
Solution 1:
sudo su
asks for a password on my system. Did you run another sudo
command before the sudo su
? Once you've run sudo
and entered your password, it doesn't require a password again for a period of time.
Solution 2:
You can just modify following lines in /etc/sudoers :
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
to
# Members of the admin group may gain root privileges
%admin ALL=(ALL) NOPASSWD: ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) NOPASSWD: ALL