I'm streaming

Ubuntu stop sudo password prompt

If you are working on a script that needs to be run as sudo we need to add out permissions to our current user ( or whoever will be running the script )

If you do not know your current user, you can run the following command to see who you are currently logged in as

$ whoami

Now that we have that, it should echo out your current user. save this for the next stop. In this example we will pretend our username is “jon”

$ sudo visudo

At the bottom of that file, we need to add the following line ( make sure to change the first word “jon” and swap it out for your current user )

jon ALL=(ALL) NOPASSWD: ALL

Now that we have all of that in place. We should now be able to run sudo while logged in as that user to run commands without being prompted for the sudo password.

An inventive, entrepreneurial and positively unsatisfied mind that constantly pushes the tech boundaries to create new solutions and devices that change people’s lives.

Leave a Reply