Ubuntu – Run a specific sudo command without a password in Ubuntu 13.10

13.10command linesudovagrantvisudo

I would like to run vagrant without being prompted for a password. As this post suggests, I used visudo to add the following line to my sudoers file.

john-moz ALL=(ALL) NOPASSWD: /usr/bin/vagrant

This does not seem to work. I am still prompted for a password when using vagrant. Am I doing something wrong?

Best Answer

Try

john-moz host = (root) NOPASSWD: /usr/bin/vagrant

You must change host to your hostname (probably also john-moz)