The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 1,099,586     Votes:  11 
Tags: command-line   password   sudo   root  
Link: 🔍 See Original Answer on Ask Ubuntu ⧉ 🔗

URL: https://askubuntu.com/q/1037177
Title: Execute sudo without Password?
ID: /2018/05/17/Execute-sudo-without-Password_
Created: May 17, 2018
Upload: September 15, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


From Super User comes a good answer:

Use the -S switch which reads the password from STDIN:

echo <password> | sudo -S <command>

Replace <password> with your password.

⇧ Failure to mount partition Don't see new kernel after upgrade  ⇩