Can anyone suggest how I can avoid this situation? It never asks for password but still complains the password is wrong.
sudo su -
Sorry, try again.
Sorry, try again.
sudo: 3 incorrect password attempts
sudoers file entry :
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
%domain\\my_engineering ALL=(ALL:ALL) ALL
Thank you.
sudo su
switches to the userroot
which is not enabled by default, no password is set for the userroot
...sudo
, you don't need a password forsu
.sudo su -
works just fine to give a root shell without theroot
account being enabled.