Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Bulk login script for Mojave

Hi All!


The ARD login script that I used with previous versions of OS no longer works. It's running but then times out with no effect. No error messages. Here is the script that I used:


osascript <<EOF

tell application "System Events"

keystroke "account"

keystroke tab

delay 0.5

keystroke "password"

delay 0.5

keystroke return

keystroke return

end tell

EOF


Has anyone managed to make this work for Mojave? Or are there any alternatives?

I'm looking after hundreds of Apple machines and logging in on each individual computer is not an option.


Many Thanks!

Posted on Aug 20, 2019 1:22 PM

Reply
Question marked as Best reply

Posted on Aug 21, 2019 1:15 AM

After posting my question yesterday, I indeed, attempted to run the script in the terminal. After some trial and error I found how to enable the script to run via ARD again. So for anyone still looking for a solution, this is it:


Step 1.

The script still works in Mojave but both ARDAgent and Script Editor need to be added to Accessibility in the Privacy tab of System Preferences.


Step2.

Then I just run the script via Apple Remote Desktop, Mojave then pops the question if I want to allow ARDAgent to control the System Events, click OK. Once allowed, the script can be used again. Yay!


By the way I could not find how to allow ARDAgent to control System Events manually on a client machine, so had to remote in and click OK. If anyone has a solution, please let me know.


Hope this helps someone!

5 replies
Question marked as Best reply

Aug 21, 2019 1:15 AM in response to VikingOSX

After posting my question yesterday, I indeed, attempted to run the script in the terminal. After some trial and error I found how to enable the script to run via ARD again. So for anyone still looking for a solution, this is it:


Step 1.

The script still works in Mojave but both ARDAgent and Script Editor need to be added to Accessibility in the Privacy tab of System Preferences.


Step2.

Then I just run the script via Apple Remote Desktop, Mojave then pops the question if I want to allow ARDAgent to control the System Events, click OK. Once allowed, the script can be used again. Yay!


By the way I could not find how to allow ARDAgent to control System Events manually on a client machine, so had to remote in and click OK. If anyone has a solution, please let me know.


Hope this helps someone!

Aug 21, 2019 9:41 AM in response to AnaMager

Adding apps to the Security Accessibility list usually requires being sat in front of the Mac as normally this is deliberately blocked for remote control sessions. (Windows has done this for years and arguably was well ahead of Macs in this area.)


See https://github.com/jamf/PPPC-Utility


If you are in an Enterprise environment this may help pre-approve such access.

Bulk login script for Mojave

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.