On Mac OSX, the third-party command line tool I have needs to run as super user unfortunately. I'm building a front-end GUI for it. My Qt/C++ application is using QProcess
to shell out to Bash and run this command via echo "{PASS}" sudo -l "{USER}" -S {COMMAND}
. I'm successful with that -- just as long as I have the Apple ID user/pass.
Is there a way my PKG installer can graphically prompt for Apple ID user/pass? Second, how would you recommend I store this securely?
echo "{PASSWORD}" | sudo -l "{USERNAME}" -S {COMMAND}
, but the problem is how to graphically prompt for that during the setup wizard of the PKG installation process?sudo
authorization.