Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

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

Mac labs: ARD login script not working in 10.11

I run the computer science labs at a state university. 5 labs w/100+ machines. We've been an all Mac shop since the switch to Intel chips.


I've been using the following login script for years:


name="user";

password="pword";


osascript <<EOF

tell application "System Events"

keystroke tab

keystroke (ASCII character 8)

keystroke tab

keystroke (ASCII character 8)

keystroke return

delay 0.5

keystroke tab

keystroke "$name"

keystroke tab

delay 0.5

keystroke "$password"

delay 0.5

keystroke return

keystroke return

end tell

EOF


When I send it to a 10.11 machine (with and without SIP), I get the following message in the Task Status field:


osascript[261:2199] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data


I don't know if the problem lies with ARD admin being 3.8 and the 10.11 client being 3.8.5. I had similar problems with admin/client disparity some time ago that went away when ARD admin was updated.


Not being able to login to my 100+machines is a deal breaker. I cannot deploy 10.11 nor can I recommend that we purchase new machines this year (we typically replace 1/3 every year).


Anyone have a script that works in 10.11?

iMac, OS X El Capitan (10.11.2)

Posted on Dec 17, 2015 5:48 AM

Reply
4 replies

Jun 25, 2016 11:15 PM in response to imissapplecomputer

have you tried


send command as: root

with command:

osascript -e 'tell application "SecurityAgent" to activate'; \

osascript -e 'tell application "System Events" to keystroke "test"'; \

osascript -e 'tell application "System Events" to keystroke tab'; \

osascript -e 'tell application "System Events" to keystroke "test2"'; \

osascript -e 'tell application "System Events" to delay 0.5'; \

osascript -e 'tell application "System Events" to keystroke return'

If that does not work, for the account your using to remote into the computer.

Log into the client. User Directory Utility to enable root

login to the computer as root

open system preferences Security & Privacy

click on privacy tab

click on accessablity

check SystemUIServer

Then try re-sending the command.

Mac labs: ARD login script not working in 10.11

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