All versions of Centrify DirectControl for Mac OS X.Question:
How to use an AppleScript as a login script?Answer:
To execute an Applescript file from a login script, use the following steps:
- Use the Copy File GP to copy an AppleScript file from Active Directory to the Mac.
- Computer Configuration / Centrify Settings / Common UNIX Settings / "Copy files"
- Make sure "Copy as binary file" is enabled.
- Use a login script with the "osascript" command to run the Applescript from the shell.
- User Configuration / Centrify Settings / Mac OS X Settings / Scripts / "Specify login script"
Please see the following Apple Manual page for osascript
- By default, the Group Policies are updated every 90 minutes and this in turn means that the Copy File GP will copy the AppleScript file over the network every 90 minutes as well.
- In most instances, it is completely safe to leave this policy switched on.
- However, if this behaviour is not desired; then the Copy File GP should be disabled (or the AppleScript entry removed from the policy) after the file has been copied over onto the local machine.
- The login script will only run at login time.
References (provided as a courtesy):