Skip to content

Instantly share code, notes, and snippets.

@Toady00
Forked from hh/setwebui_adminpass.rb
Created September 14, 2012 15:21
Show Gist options
  • Save Toady00/3722593 to your computer and use it in GitHub Desktop.
Save Toady00/3722593 to your computer and use it in GitHub Desktop.
reset admin webui password for chef
require 'rubygems'
require 'chef/config'
require 'chef/webui_user'
Chef::Config.from_file(File.expand_path("~/.chef/knife.rb"))
user = Chef::WebUIUser.load('admin')
user.set_password("MyAwesomePassword")
user.save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment