Skip to content
This repository was archived by the owner on Oct 22, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions manifests/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@
# Search base for the shadow database. *base* will be appended.
# *Optional* (defaults to false)
#
# [nss_map_objectclass]
# Hash with nss objectclass mappings.
# *Optional* (defaults to nothing)
#
# [nss_map_attribute]
# Hash with nss attributes mappings.
# *Optional* (defaults to nothing)
#
# [pam]
# If enabled (pam => true) enables pam module, which will
# be setup to use pam_ldap, to enable authentication.
Expand Down Expand Up @@ -178,10 +186,12 @@
$ssl = false,
$ssl_cert = false,

$nsswitch = false,
$nss_passwd = false,
$nss_group = false,
$nss_shadow = false,
$nsswitch = false,
$nss_passwd = false,
$nss_group = false,
$nss_shadow = false,
$nss_map_objectclass = false,
$nss_map_attribute = false,

$pam = false,
$pam_att_login = 'uid',
Expand Down
16 changes: 10 additions & 6 deletions templates/etc/openldap/ldap.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@ bindpw <%= @bindpw %>
<% end -%>

<% if @nsswitch == true then -%>
# DNs in groups
#nss_schema rfc2307bis
#nss_map_attribute uniquemember member
#nss_map_attribute memberuid member
#nss_getgrent_skipmembers yes

<% if @nss_map_objectclass != false -%>
<% @nss_map_objectclass.each_pair do |local, remote| -%>
nss_map_objectclass <%= local -%> <%= remote %>
<%- end -%>
<%- end -%>
<% if @nss_map_attribute != false -%>
<% @nss_map_attribute.each_pair do |local, remote| -%>
nss_map_attribute <%= local -%> <%= remote %>
<%- end -%>
<%- end -%>
nss_base_passwd <%= @nss_passwd %>,<%= @base %>?sub
nss_base_shadow <%= @nss_shadow %>,<%= @base %>?sub
nss_base_group <%= @nss_group %>,<%= @base %>?one
Expand Down