Created
July 24, 2012 03:12
-
-
Save glarizza/3167789 to your computer and use it in GitHub Desktop.
Setting the Hash
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': | |
| ensure => 'present', | |
| gid => '20', | |
| password => '99833f0568c94876fdc3de1f5587024411c7cd46e2154afa485406923239327ef5e299f6aa5a3a9436c2dd7a45258bbce0fb3c7f9b6b4f5b38630f43942695069947af6e', | |
| uid => '28', | |
| } | |
| ## Setting the Hash | |
| ┌(10198) [gary@Satori] [puppet: 2.7.14] [ Windows 7.vmx ] | |
| └(~)▷ sudo puppet resource user jeff password=b5b66261296695d4a530bd3e1fa59524b5aabe534015fd2838f11b89abe33a3dbf1a9ae8c84bf56ce7cac52a5e485047f6426ae2090fe1df093fbec9e411731983f2c95e -v | |
| notice: /User[jeff]/password: changed password | |
| user { 'jeff': | |
| ensure => 'present', | |
| password => 'b5b66261296695d4a530bd3e1fa59524b5aabe534015fd2838f11b89abe33a3dbf1a9ae8c84bf56ce7cac52a5e485047f6426ae2090fe1df093fbec9e411731983f2c95e', | |
| } | |
| ## Creating a Hash | |
| ┌(10199) [gary@Satori] [puppet: 2.7.14] [ Windows 7.vmx ] | |
| └(~)▷ puppet apply -ve "notice(str2saltedsha512('make me a hash'))" | |
| info: Loading facts in /Users/gary/.puppet/modules/concat/lib/facter/concat_basedir.rb | |
| info: Loading facts in /Users/gary/.puppet/modules/cups/lib/facter/printers.rb | |
| info: Loading facts in /Users/gary/.puppet/modules/firewall/lib/facter/iptables.rb | |
| info: Loading facts in /Users/gary/.puppet/modules/stdlib/lib/facter/facter_dot_d.rb | |
| info: Loading facts in /Users/gary/.puppet/modules/stdlib/lib/facter/puppet_vardir.rb | |
| info: Loading facts in /Users/gary/.puppet/modules/stdlib/lib/facter/root_home.rb | |
| notice: Scope(Class[main]): c49030525993dd6a1c60a7b52fe75098545a898622b299cf92429408f77b79532f1bcd160a7ebb347b7a1365008126d2f82ef3dbcc3daea9737d92dcfaea2ac0a72c82cc | |
| info: Applying configuration version '1343099429' | |
| notice: Finished catalog run in 0.07 seconds | |
| ## Prettier Output | |
| ┌(10212) [gary@Satori] [puppet: 2.7.14] [ Windows 7.vmx ] [1] | |
| └(~)▷ puppet apply -ve '$var = str2saltedsha512("passhash") notice("The password is: ${var}")' | |
| info: Loading facts in /Users/gary/.puppet/modules/concat/lib/facter/concat_basedir.rb | |
| info: Loading facts in /Users/gary/.puppet/modules/cups/lib/facter/printers.rb | |
| info: Loading facts in /Users/gary/.puppet/modules/firewall/lib/facter/iptables.rb | |
| info: Loading facts in /Users/gary/.puppet/modules/stdlib/lib/facter/facter_dot_d.rb | |
| info: Loading facts in /Users/gary/.puppet/modules/stdlib/lib/facter/puppet_vardir.rb | |
| info: Loading facts in /Users/gary/.puppet/modules/stdlib/lib/facter/root_home.rb | |
| notice: Scope(Class[main]): The password is: 9497f964bddb8343a1d698c84dd43445fa77a8416415731694cd21f6b2915f87cb8542e7f5bb5d5edbc1714fdcd3e2c117dffb6a92f9b15177f38c035949dd832042f456 | |
| info: Applying configuration version '1343100545' | |
| notice: Finished catalog run in 0.06 seconds | |
| ## Applying THAT hash | |
| ┌(10200) [gary@Satori] [puppet: 2.7.14] [ Windows 7.vmx ] [1] | |
| └(~)▷ sudo puppet resource user jeff password=c49030525993dd6a1c60a7b52fe75098545a898622b299cf92429408f77b79532f1bcd160a7ebb347b7a1365008126d2f82ef3dbcc3daea9737d92dcfaea2ac0a72c82cc | |
| notice: /User[jeff]/password: changed password | |
| user { 'jeff': | |
| ensure => 'present', | |
| password => 'c49030525993dd6a1c60a7b52fe75098545a898622b299cf92429408f77b79532f1bcd160a7ebb347b7a1365008126d2f82ef3dbcc3daea9737d92dcfaea2ac0a72c82cc', | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment