Hi,
I’d like to execute a shell command as root using “sudo” using the shell class inside a desktop app.
For this, I’d have to either ask the user’s password and pass it to the shell, or “elevate” the shell as root.
In both cases, the authentication dialog would seem to be the logical choice, but it would neither give the user’s password back to my app (fortunately, I’d say…) nor let me run a single shell with privileges (I think).
The only way I think of would be to present a dialog asking the user for his/her password and give it to the shell, but that’s generally said to be something to avoid as much as possible, for reasons that make sense.
It would be for Mac, initially.
7 posts - 3 participants