This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'osx/cocoa' | |
| require 'pp' | |
| include OSX | |
| users_plist_dir = '/var/db/dslocal/nodes/Default/users' | |
| resource_name = 'gary' | |
| users_plist = OSX::NSMutableDictionary.dictionaryWithContentsOfFile("#{users_plist_dir}/#{resource_name}.plist") | |
| pp users_plist | |
| pp users_plist['ShadowHashData'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'osx/cocoa' | |
| include OSX | |
| nsdata = xml.to_ns.dataUsingEncoding(NSUTF8StringEncoding) | |
| obj = OSX::NSPropertyListSerialization.objc_send( | |
| :propertyListFromData, nsdata, | |
| #:mutabilityOption, OSX::NSPropertyListMutableContainersAndLeaves, | |
| :mutabilityOption, OSX::NSPropertyListImmutable, | |
| :format, nil, | |
| :errorDescription, nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root@master:~# puppet help node_aws create | |
| USAGE: puppet node_aws create [--credentials=] | |
| [--platform=] | |
| [--region=] | |
| [--availability-zone=] | |
| [--tags= | -t=] | |
| <--image= | -i=> | |
| <--type=> | |
| <--keyname=> | |
| [--subnet= | -s=] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'puppet' | |
| require 'puppet/face' | |
| arguments = { 'image' => 'ami-30fe7300', | |
| 'keyname' => 'Your_Key', | |
| 'type' => 't1.micro', | |
| 'region' => 'us-west-2' } | |
| list_args = { 'region' => 'us-west-2' } | |
| install_args = { 'login' => 'ec2-user', | |
| 'keyfile' => 'Your_Key.pem', | |
| 'install_script' => 'puppet-enterprise-http', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'puppet' | |
| require 'facter/util/plist' | |
| require 'pp' | |
| @@users_plist_dir = '/var/db/dslocal/nodes/Default/users' | |
| resource_name = 'glarizza' | |
| users_plist = Plist::parse_xml(`plutil -convert xml1 -o /dev/stdout #{@@users_plist_dir}/#{resource_name}.plist`) | |
| password_hash_plist = users_plist['ShadowHashData'][0].string | |
| IO.popen('plutil -convert xml1 -o - -', mode='r+') do |io| | |
| io.write password_hash_plist | |
| io.close_write |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $password = $macosx_productversion_major ? { | |
| '10.7' => 'aaa6c1f945132d2599079fe90c9d20e608e607344b86328c1ef8ad8dc820c1bb5a31fd816b8ae546fed6dcf58ff023794f8250a66935d6d0687b737f24aae2ed', | |
| '10.8' => '0590ade19e6953c135ae872ae77618235df7d46c63de7f9a0fcdf2cd9e7d85e4b7ca868101235b6158e05a309805ee4814b027a4be9c23ec2926bc8172269affba5c9a5985e81091fa6898076d297f1faa75fa617551ef1671d7520055c4a0d97b9b9c5805aa322baedbcd8ee9c523811653ac2ea9e9c8d8f1ac519a0f2b595e', | |
| default => 'SHA1 Style 10.5 and 10.6 Hash', | |
| } | |
| user { 'test': | |
| ensure => present, | |
| uid => '550', | |
| password => $password, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## OS Version | |
| ┌(10194) [gary@Satori] [puppet: 2.7.14] [ Windows 7.vmx ] [1] | |
| └(~)▷ facter sp_os_version | |
| Mac OS X 10.7.4 (11E53) | |
| ## Reading the Hash | |
| ┌(10196) [gary@Satori] [puppet: 2.7.14] [ Windows 7.vmx ] | |
| └(~)▷ sudo puppet resource user jeff | |
| Password: | |
| user { 'jeff': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## The /System/Library/LaunchDaemons/org.cups.cupsd.plist file | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Label</key> | |
| <string>org.cups.cupsd</string> | |
| <key>EnableTransactions</key> | |
| <true/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| NORMIES | |
| house of nanking (brandon wants) | |
| Pizzeria Delfina (pizza/pig ears) | |
| Dino's (spaghetti/meatballs) | |
| La ciccia | |
| Perbacco | |
| mamas (benedict) | |
| kokarri estario | |
| fish and farm (burger) | |
| mission beach cafe |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| └(~/src/puppet)▷ pkgutil --file-info /usr/libexec/PlistBuddy | |
| volume: / | |
| path: /usr/libexec/PlistBuddy | |
| pkgid: com.apple.pkg.BaseSystemBinaries | |
| pkg-version: 10.7.0.1.1.1306847324 | |
| install-time: 1330157175 | |
| uid: 0 | |
| gid: 0 | |
| mode: 755 |