def enable_auto_login(name):
    cmd = ['defaults',
           'write',
           '/Library/Preferences/com.apple.loginwindow.plist',
           'autoLoginUser',
           name]
    __salt__['cmd.run'](cmd)
    current = get_auto_login()
    return current if isinstance(current, bool) else current.lower() == name.lower()
.. versionadded:: 2016.3.0
dataset/ETHPy150Open saltstack/salt/salt/modules/mac_user.py/enable_auto_login