timeout + root password + strace in one line

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'm trying to run a timeout command, with root password and strace all in one line, the original cmmand is



sudo -S timeout 4 strace -p 2829 -f -e trace=write -s 9999



but that promps for entering the root password. which I already have and wants to put it in one line, so this becomes



echo ROOT_PASSWORD | sudo -S strace -p 2829 -f -e trace=write -s 9999



I tried putting timeout in the front, middle or at the end but it doesn't work, such as



timeout 4 | echo ROOT_PASSWORD | sudo -S strace -p 2829 -f -e trace=write -s 9999



thank you for your help! =)







share|improve this question




















  • Why not just configure sudo to allow password less execution?
    – Raman Sailopal
    Jan 5 at 11:22














up vote
0
down vote

favorite












I'm trying to run a timeout command, with root password and strace all in one line, the original cmmand is



sudo -S timeout 4 strace -p 2829 -f -e trace=write -s 9999



but that promps for entering the root password. which I already have and wants to put it in one line, so this becomes



echo ROOT_PASSWORD | sudo -S strace -p 2829 -f -e trace=write -s 9999



I tried putting timeout in the front, middle or at the end but it doesn't work, such as



timeout 4 | echo ROOT_PASSWORD | sudo -S strace -p 2829 -f -e trace=write -s 9999



thank you for your help! =)







share|improve this question




















  • Why not just configure sudo to allow password less execution?
    – Raman Sailopal
    Jan 5 at 11:22












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm trying to run a timeout command, with root password and strace all in one line, the original cmmand is



sudo -S timeout 4 strace -p 2829 -f -e trace=write -s 9999



but that promps for entering the root password. which I already have and wants to put it in one line, so this becomes



echo ROOT_PASSWORD | sudo -S strace -p 2829 -f -e trace=write -s 9999



I tried putting timeout in the front, middle or at the end but it doesn't work, such as



timeout 4 | echo ROOT_PASSWORD | sudo -S strace -p 2829 -f -e trace=write -s 9999



thank you for your help! =)







share|improve this question












I'm trying to run a timeout command, with root password and strace all in one line, the original cmmand is



sudo -S timeout 4 strace -p 2829 -f -e trace=write -s 9999



but that promps for entering the root password. which I already have and wants to put it in one line, so this becomes



echo ROOT_PASSWORD | sudo -S strace -p 2829 -f -e trace=write -s 9999



I tried putting timeout in the front, middle or at the end but it doesn't work, such as



timeout 4 | echo ROOT_PASSWORD | sudo -S strace -p 2829 -f -e trace=write -s 9999



thank you for your help! =)









share|improve this question











share|improve this question




share|improve this question










asked Jan 5 at 7:49









Jim

1176




1176











  • Why not just configure sudo to allow password less execution?
    – Raman Sailopal
    Jan 5 at 11:22
















  • Why not just configure sudo to allow password less execution?
    – Raman Sailopal
    Jan 5 at 11:22















Why not just configure sudo to allow password less execution?
– Raman Sailopal
Jan 5 at 11:22




Why not just configure sudo to allow password less execution?
– Raman Sailopal
Jan 5 at 11:22















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f414937%2ftimeout-root-password-strace-in-one-line%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f414937%2ftimeout-root-password-strace-in-one-line%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?