Posted on 08-03-2012 07:33 AM
I have about 50 carts of Macbooks I'm trying to image and configure over the summer, one of the steps I wanted to add was a script that loged in the user in and run some scripts.
Here is part of the script that is not working with Casper Remote:
osascript <<EndOfMyScript
tell application "System Events"
keystroke "username"
keystroke return
delay 0.5
keystroke "password"
delay 0.5
keystroke return
end tell
EndOfMyScript
I can get it working if I deploy it locally or with Apple Remote Desktop but if I deploy it with Casper Remote it always gives me the same error.
Script Result: 43:65: execution error: An error of type -10810 has occurred. (-10810)
Anyone ever have this issue? I just want to automate some of the configuration so I can save some time.
Thank you,
Josh
Solved! Go to Solution.
Posted on 08-03-2012 08:36 AM
is this supposed to be typing a username and password in the loginwindow?
you cannot do that.
look at
defaults write /Library/Preferences/com.apple.loginwindow autoLoginUser username
defaults write /Library/Preferences/com.apple.loginwindow lastUser loggedIn
defaults write /Library/Preferences/com.apple.loginwindow lastUserName username
then you need to create a /etc/kcpassword file that has the proper permissions and the proper encrypted pw in it.
this can be done by logging in said user on another computer, and setting it to autologin and then grabbing the file.
then when you are done you can defaults delete the autologinuser and the kcpassword file
Posted on 08-03-2012 08:36 AM
is this supposed to be typing a username and password in the loginwindow?
you cannot do that.
look at
defaults write /Library/Preferences/com.apple.loginwindow autoLoginUser username
defaults write /Library/Preferences/com.apple.loginwindow lastUser loggedIn
defaults write /Library/Preferences/com.apple.loginwindow lastUserName username
then you need to create a /etc/kcpassword file that has the proper permissions and the proper encrypted pw in it.
this can be done by logging in said user on another computer, and setting it to autologin and then grabbing the file.
then when you are done you can defaults delete the autologinuser and the kcpassword file
Posted on 08-03-2012 08:39 AM
When you say you would like to run some scripts, do they have to be run when the user is logged in, or is it not user specific?
If it is not user specific then just push that out with Casper Remote instead of trying to login with a script first. That should work atleast.
As for not being able to login with pushing the script with Casper Remote, that may be because it tries to run it as your Casper Management user and it really comes down to being a GUI type script, because it is telling the GUI to do those actions.
Hope this helped.
@nessts: The login script works to login and out users when pushed out with Apples Remote Desktop. I even use a similar script whenever I need to batch login users.
Posted on 08-03-2012 08:55 AM
@nessts: Like usher.br said it works with ARD, just not with Casper Remote. Yea, that was my second option. I was going to try that if I could not get this to work. Thank you.
@usher.br: So here is what I need to do:
I figured thats why it did not work, It looks like im going to need to try Nessts method to get it working how I need it. I hate Kaspersky....
Again, thank you both for the response.
Posted on 08-03-2012 09:49 AM
@jbates, IIRC if in Casper Admin.. If you tick "this application needs to be installed on the root volume at imaging" (something like that, it's in the 3rd tab), then Casper should login to the mac @ firstboot (using an account called Adobeinstall)... & Casper will then install Kaspersky whilst logged in.
Pretty sure that will work.
Posted on 08-03-2012 02:33 PM
Nessts idea worked great.
Thanks again for the help