blob: d7a1294829a6232fef82ba1b9a9996ab1376979a (
plain) (
tree)
|
|
[0;35m#### Or modify an existing entry:[0m
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! %>
-
replace: environment
environment: <%= @environment %>
<%- unless @ips.empty? -%>
-
delete: ipHostNumber
<%- unless @ips["v4"].nil? -%>
-
add: ipHostNumber
ipHostNumber: <%= @ips["v4"]["ipAddress"] %>
<%- end -%>
<%- unless @ips["v6"].nil? -%>
-
add: ipHostNumber
ipHostNumber: <%= @ips["v6"]["ipAddress"] %>/<%= @ips["v6"]["mask"] %>
<%- end -%>
<%- end -%>
|