From 548061112d2e2627317f9379d2f501fcf3f6ea54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 30 Aug 2017 22:16:39 +0200 Subject: Add LDAP support --- .../templates/puppet/host_ldap.info.erb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 modules/base_installation/templates/puppet/host_ldap.info.erb (limited to 'modules/base_installation/templates/puppet/host_ldap.info.erb') diff --git a/modules/base_installation/templates/puppet/host_ldap.info.erb b/modules/base_installation/templates/puppet/host_ldap.info.erb new file mode 100644 index 0000000..a350c37 --- /dev/null +++ b/modules/base_installation/templates/puppet/host_ldap.info.erb @@ -0,0 +1,17 @@ +#### Please add this node to LDAP: +ldapadd -D "cn=root,<%= @ldap_base %>" -W << 'EOF' +dn: <%= @ldap_dn %> +cn: <%= @ldap_cn %> +objectclass: device +objectclass: top +objectclass: simpleSecurityObject +objectclass: puppetClient +userpassword: {SSHA}<%= Base64.encode64(Digest::SHA1.digest(@ldap_password+@ssha_ldap_seed)+@ssha_ldap_seed).chomp! %> +EOF +#### Or modify an existing entry: +ldapmodify -D "cn=root,<%= @ldap_base %>" -W << 'EOF' +dn: <%= @ldap_dn %> +changetype: modify +replace: userPassword +userpassword: {SSHA}<%= Base64.encode64(Digest::SHA1.digest(@ldap_password+@ssha_ldap_seed)+@ssha_ldap_seed).chomp! %> +EOF -- cgit v1.2.3