Skip to main content

Hi,

I am running Mac OS X 13.3.1 for 100 iMacs, after a schedule maintenance update, I would want to make sure student account is able to login to the iMac. 

I used to be able to use osascript but now it give an error keystroke not supported.

`osascript -e 'tell application "System Events"' -e 'keystroke "admin"' -e 'keystroke tab' -e 'delay 0.5' -e 'keystroke "abcd1234"' -e 'delay 3.5' -e 'keystroke return' -e 'keystroke return' -e 'end tell'`

I was reading the articles but not getting any results.

https://community.jamf.com/t5/jamf-pro/10-7-auto-login-with-osascript-at-welcome-screen-just-isn-t/m-p/52599

https://community.jamf.com/t5/jamf-pro/issue-running-a-script-at-the-login-screen-with-casper-remote/m-p/128877#M117994

Any others successful method that can share?

Thank you

 

If everyone is using a shared account, why don't you just enable that account to automatically log in?


If everyone is using a shared account, why don't you just enable that account to automatically log in?


There are teacher account and student accounts. We will need to login to each to make sure a software can runs. So will need to login to individually. Hope it worth the effort.


Anyone managed to achieve this?


You can get this working, but anything after 13.6.1 will no longer work.  Seems the critical step you are missing is ensuring that each box will allow System Events.  The only way I was able to engage this (allow) was to already have the machine logged in and then run the osascript.  Once allowed, you were able to login directly at the login screen.  But again, this is no longer the case with Sonoma.  Myself and others are struggling with getting this going again.  See: https://community.jamf.com/t5/jamf-pro/sonoma-and-apple-remote-desktop-running-unix-osascript-as-root-at/m-p/319038/emcs_t/S2h8ZW1haWx8dG9waWNfc3Vic2NyaXB0aW9ufExYWE9CVlpYQ1BJUzVCfDMxOTAzOHxTVUJTQ1JJUFRJT05TfGhL#M276740

 


Reply