Puppet/Recipes

From Omnia
Revision as of 04:18, 17 February 2017 by Kenneth (talk | contribs) (Created page with "== Root Password == <pre> class site::root_user { # This will enforce the root password of "puppet" user { root: ensure => present, password => '$6$7pe0INu/$Uxsn....")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Root Password

class site::root_user {
  # This will enforce the root password of "puppet"
  user { root:
    ensure => present,
    password => '$6$7pe0INu/$Uxsn.lb/mJjd9394DIJx5JS9a1NVhrpWDpXRtPGS78 /BfyShhOf1G0ft7mRHspXDZo6.ezyqpqIXHQ8Tl8ZJt0',
  }
}

src: https://ask.puppet.com/question/13589/how-can-i-best-manage-root-passwords-for-many-servers/

--

$password = 'hello'

user { 'test_user':
    ensure   => 'present',
    password => generate('/bin/sh', '-c', "mkpasswd -m sha-512 ${password} | tr -d '\n'"),
}

src: http://stackoverflow.com/questions/19114328/managing-a-user-password-for-linux-in-puppet