1

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.

  • we added the eng group to the domain and users are able to login to the VM but failing to get sudo access. Yes both are tried but same issue. – ravi Apr 16 '18 at 7:06
  • sudo su switches to the user root which is not enabled by default, no password is set for the user root... – mook765 Apr 16 '18 at 7:08
  • 1
    @mook765 With sudo, you don't need a password for su. sudo su - works just fine to give a root shell without the root account being enabled. – Chai T. Rex Apr 16 '18 at 7:37
  • %domain\\my_engineering ALL=(ALL:ALL) NOPASSWD:ALL also tried but no luck. i am new to ubuntu. where as in redhat i went well but in ubuntu somewhere i should look into but not getting some one who solved this please suggest me. Thank you :)\ – ravi Apr 16 '18 at 9:37
  • Perhaps you will find something helpful here: Allow AD Groups to SUDO – steeldriver Apr 16 '18 at 12:13
0

In order to have sudo not asking a password you'd use ALL=(ALL) NOPASSWD: ALL attached to the user or to the group of your choice in the configuration file.

I'd suggest you to see man sudoers or a tutorial like this.

I prefer the man page first, though.

By the way, in order to get a root shell you can also run sudo -s -H. Again, the man page can be of help.

  • Hi Uqbar, tried already which you suggested commands but here domain users able to login and sudo access cant. %domain\\my_engineering ALL=(ALL:ALL) NOPASSWD:ALL also tried but no luck. Please suggest me – ravi Apr 17 '18 at 9:40
  • I see now that you are trying to use Windows authentication services. Can those users log in?What does your Linux system says when they run the "id" command? Do you want them to be asked for the password or not? – EnzoR Apr 17 '18 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.