Hi - I am writing an app that has several “default writes” commands to run system tweaks. Since I need to distribute this app across campus, I cannot provide and administrator name and password in the script because they will be different in every department. My solution to this is when launching the app, an authentication dialog should appear for the local administrator.
Thank you both. I can also use NSTask for this, but I was interested to call this function in Cocoa the way it is done to unlock the PadLock icon in System Preferences which in-turn invokes the authentication dialog.
There’s an authorization API, but it’s C-based and you can’t call it from ASObjC. The way it’s used usually involves launching a separate process with the extra privileges.