Privileged Exec is an AppleScript framework that makes it extremely easy to create applications that run Unix commands as root, without prompting the user for an administrator password every time. This is accomplished by securely storing an administrator password in the default keychain. This password can then be used to run any Unix commands as root with no user interaction.
By putting your code in the handler â€žtheCommands()â€° you quickly create an application that can run any Unix tasks you want with no user interaction after initial setup. The first time your application is run, it will ask the user for an administrator password. This password will then be stored in the system Keychain and on subsequent runs, your application will retrieve the password from the keychain and use the password to execute any commands that you want to run with administrator privileges. All of the password management is provided in the Privileged Exec framework.
Join over 500,000 subscribers.
Subscribe for our newsletter with best Mac offers from MacUpdate.