The Cookie Machine - Click here to drag window

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

Views: 871,410     Votes:  8 
Tags: command-line   password   sudo   root  
Link: 🔍 See Original Answer on Ask Ubuntu 🔗

Title: Execute sudo without Password?
ID: /2018/05/17/Execute-sudo-without-Password_
Created: May 17, 2018
Upload: November 24, 2022    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  ⇩