dhoer / chef-macosx_autologin

Chef cookbook to configure autologin using Gavin Brock's kcpassword

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mac OS X Autologin Cookbook

Cookbook Version Build Status

Enables/disables automatic login for user on boot using a modified version of Gavin Brock's kcpassword.

Requirements

  • Chef 11.14+

Platforms

  • Mac OS X 10.7+

Usage

Requires super-user privileges.

Enable automatic login for user and display login screen

macosx_autologin 'username' do
  password 'password
  restart_loginwindow true
  action :enable
end

Disable automatic login and display login screen

macosx_autologin 'username' do
  restart_loginwindow true
  action :disable
end

Actions

  • enable - Enables autologin.
  • disable - Disables autologin.

Attributes

  • username - Username to login as. Required when enabled. Defaults to resource block name.
  • password - Password of username. Required when enabled.
  • restart_loginwindow - Display login screen. Default false.

ChefSpec Matchers

This cookbook includes custom ChefSpec matchers you can use to test your own cookbooks.

Example Matcher Usage

expect(chef_run).to enable_macosx_autologin('username').with(
  password: 'password'
)

Cookbook Matchers

  • enable_macosx_autologin(resource_name)
  • disable_macosx_autologin(resource_name)

Getting Help

Contributing

Please refer to CONTRIBUTING.

License

MIT - see the accompanying LICENSE file for details.

About

Chef cookbook to configure autologin using Gavin Brock's kcpassword

License:MIT License


Languages

Language:Ruby 74.7%Language:Perl 25.3%