0

I have built an UI with nwjs for a node app but It needs sudo password to execute a command. How can I interact with the console to enter a password given in a UI field? Thanks

Yábir Garcia
  • 329
  • 3
  • 17

1 Answers1

0

You can follow the answer in this thread.

If it's only one command then it's better to grant the user running node permissions to run the command without password. This answer from askbuntu should be applicable in a similar way on most linux distros.

Community
  • 1
  • 1
snaut
  • 2,261
  • 18
  • 37