sudo -S
-
-S, --stdin Write the prompt to the standard error and read the password from the standard input instead of using the terminal device.
How to write the above (c++) including "standard input"?
Can I use (read from) lineEdit as "standard input" ?
I am trying to bypass user need to input password.. -
-S, --stdin Write the prompt to the standard error and read the password from the standard input instead of using the terminal device.
How to write the above (c++) including "standard input"?
Can I use (read from) lineEdit as "standard input" ?
I am trying to bypass user need to input password..@AnneRanch said in sudo -S:
How to write the above (c++) including "standard input"?
I don't follow.
Also quotations are not used, these are very real objects, not just terms:
https://en.wikipedia.org/wiki/Standard_streamsCan I use (read from) lineEdit as "standard input" ?
No. You can read/write the standard input/output with Qt by attaching to the corresponding C++ handle (set up by the runtime).
QTextStream in(stdin); //< Standard input QTextStream out(stdout); //< Standard output QTextStream err(stderr); //< Standard error
-
@AnneRanch said in sudo -S:
How to write the above (c++) including "standard input"?
I don't follow.
Also quotations are not used, these are very real objects, not just terms:
https://en.wikipedia.org/wiki/Standard_streamsCan I use (read from) lineEdit as "standard input" ?
No. You can read/write the standard input/output with Qt by attaching to the corresponding C++ handle (set up by the runtime).
QTextStream in(stdin); //< Standard input QTextStream out(stdout); //< Standard output QTextStream err(stderr); //< Standard error
I don’t know, Anne, how often we have told you: Don’t spam this forum by asking th same question multiple times, while ignoring helpful answers in other posts. You were told here, to use /etc/sudoers to prevent the password interaction. If you choose to ignore advice, that’s fine. Just don’t ask the same question again.