Is there any graphical “sudo” for Mac OS X?

前端 未结 9 769
后悔当初
后悔当初 2020-12-05 07:44

I\'m designing a little software in Java. I don\'t know the term/definition to what I\'m doing, but I\'m prompting commands from Java to the terminal. Something like this:

9条回答
  •  日久生厌
    2020-12-05 07:57

    This also looks promising: cocoasudo

    enter image description here

    It uses the OSX native Authorization Services API:

    For Mac OS X Cocoa-based apps, there is analagous ability to sudo provided via the Authorization Services API. Use of the API allows you to prompt the user for their username and password requesting the ability to escalate privileges.

    For that case, I’ve written a small utility that I’ve dubbed cocoasudo. Use cocoasudo in much the same way you’d use sudo. However, instead of users being prompted for their password in a Terminal window, they’ll get a dialog prompt via the Authorization Services API.

提交回复
热议问题