2

Background

I have a bunch of OS X Yosemite Mac Minis that are used as slaves by a Jenkins master machine to run Selenium tests using Google Chrome.

These slave machines get restarted on a daily basis.

Problem

After the restart, the machines are at a login screen asking for a username and password. Running Google Chrome remotely on the machines fails until a manual login is performed.

Is there a way to automate this login?

Things I have tried

  1. Executing a login script remotely on the Mac Mini using ssh root@<macmini-address> "bash -s" < ./login.sh where login.sh contains the following:
#!/bin/bash
osascript <<EOF
tell application "System Events"
keystroke "<replace with user>"
keystroke tab
delay 0.5
keystroke "<replace with password>"
delay 0.5
keystroke return
keystroke return
end tell
EOF

This results in the following error:

33:49: execution error: An error of type -10810 has occurred. (-10810)
  1. Sending the above AppleScript to the Mac Mini through Apple Remote Desktop (ARD).

This works but on some occasions, ARD is not able to send the script over to some Mac Minis showing a 'Client Software Not Active' message in the ARD status column.

  • We run Chrome tests from a Jenkins installation on a Mac Mini. Jenkins runs under its own user id. I wonder why this shouldn‘t work in your setup? How are the slaves configured? How do you invoke the tests? – not2savvy Nov 16 '17 at 7:40
2

macOS has an automated login feature.

  1. Choose System Preferences from the Apple menu (), then click Users & Groups.
  2. Click the lock , then enter account password.
  3. If you aren't logged in as an administrator, you're asked to enter an administrator's name and password.
  4. Click Login Options.
  5. Choose an account from from the “Automatic login” pop-up menu, then enter the password of that account.
  6. The account is now set up to log in automatically when your Mac starts up. You might still be asked to log in manually after logging out, switching back from another user account, or locking your screen.

enter image description here

Not all accounts work for automatic login. If you can't select your account, make sure FireVault is turned off and the account doesn't use an iCloud password for the login.

  • I am aware of this workaround but it's not possible to use due to it being disabled by a profile. – edst Nov 16 '17 at 2:16
  • 1
    @edst Seems like you should contact your sysadmin about that then, or remove the profile if you can. I can't seem to think of a particularly secure way of doing automatic login otherwise. – JMY1000 Nov 16 '17 at 2:46
-2

Have you tried enabling automatic login ?https://support.apple.com/en-us/HT201476

  • Automatic login is not possible due to security policy. – edst Nov 16 '17 at 1:23
  • 1
    @edst As in a device profile or organization written policy? – JMY1000 Nov 16 '17 at 1:26
  • 1
    @Sub We try to refrain from link only answers here on Ask Different, as they decrease readability and are often susceptible to link rot. – JMY1000 Nov 16 '17 at 1:26
  • @JMY1000 It's a profile. – edst Nov 16 '17 at 2:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .