Search code examples
vagrantsudo

Why can user vagrant do "sudo su -" without entering password?


I am a new student about vagrant. I just found that I can change to root by "sudo su -" without entering a password when inside the box supervised by Vagrant. Curiously I checked the "/etc/sudoers" and found nothing about user vagrant. Can anyone kindly explain this?


Solution

  • /etc/sudoers include another file which contains the NOPASSWD line.

    vagrant@ubuntu-12:~$ sudo cat /etc/sudoers.d/vagrant 
    %vagrant ALL=NOPASSWD:ALL