Posted on 01-14-2020 12:45 AM
Is there a way with a script to create a "dummy" interactive logon session on a remote Mac? Similar to what happens when you log in with Screen Sharing but choose to log on as yourself instead of sharing the current user's screen?
Basically I'm trying to get Unity remotely activated on a classroom full of Macs, but it currently has a bug where even if ‑nographics
is selected, it requires someone to be logged on to the target Mac in order for activation to succeed.
Thanks,
Dan Jackson (Senior ITServices Technician)
Long Road Sixth Form College
Cambridge, UK.
Posted on 01-14-2020 01:13 AM
You can do this with Apple Remote Desktop and the "Send Unix Command" option:
osascript -e 'tell application "System Events" to keystroke "LOGIN_NAME"';
osascript -e 'tell application "System Events" to keystroke tab';
osascript -e 'tell application "System Events" to delay 0.5';
osascript -e 'tell application "System Events" to keystroke "PASSWORDHERE"';
osascript -e 'tell application "System Events" to delay 0.5';
osascript -e 'tell application "System Events" to keystroke return'
https://www.jamf.com/jamf-nation/discussions/15038/mass-login-in-os-x
Posted on 01-14-2020 01:16 AM
@davidacland so there's no way to do it in the background, so it doesn't impact the physical screen?
Posted on 01-14-2020 01:18 AM
The only other thing I can think of is a VNC session, but that would have to be one by one