ldap: Changed ldap::auth to use nslcd instead of sssd on Fedora.
This commit is contained in:
parent
835ac7433b
commit
139a27dc94
1 changed files with 3 additions and 47 deletions
|
@ -21,9 +21,9 @@ class ldap::auth inherits ldap::client {
|
|||
$ldap_uri = inline_template('<%= @ldap_server.join(" ") -%>')
|
||||
|
||||
case $::operatingsystem {
|
||||
"centos","redhat": {
|
||||
"centos","fedora","redhat": {
|
||||
case $::operatingsystemrelease {
|
||||
/^6/: {
|
||||
default: {
|
||||
package { "nss-pam-ldapd":
|
||||
ensure => installed,
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ class ldap::auth inherits ldap::client {
|
|||
notify => Service["nscd"],
|
||||
}
|
||||
}
|
||||
default: {
|
||||
/^[1-5]\./: {
|
||||
package { "nss_ldap":
|
||||
ensure => installed,
|
||||
}
|
||||
|
@ -94,50 +94,6 @@ class ldap::auth inherits ldap::client {
|
|||
require => Package["nscd"],
|
||||
}
|
||||
}
|
||||
Fedora: {
|
||||
package { "sssd":
|
||||
ensure => installed,
|
||||
}
|
||||
if versioncmp($::operatingsystemrelease, "18") == 1 {
|
||||
exec { "authconfig --enableldap --enableldapauth --ldapserver='${ldap_uri}' --ldapbasedn='${ldap_basedn}' --krb5realm='' --update":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
creates => "/etc/sssd/sssd.conf",
|
||||
require => [ Package["authconfig"], Package["sssd"], ],
|
||||
notify => Exec["authconfig --enablesssd --update"],
|
||||
}
|
||||
exec { "authconfig --enablesssd --update":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
refreshonly => true,
|
||||
before => Augeas["sssd-conf"],
|
||||
}
|
||||
} else {
|
||||
package { "pam_ldap":
|
||||
ensure => installed,
|
||||
before => Package["sssd"],
|
||||
}
|
||||
exec { "authconfig --enableldap --enableldapauth --ldapserver='${ldap_uri}' --ldapbasedn='${ldap_basedn}' --enablesssd --krb5realm='' --update":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
unless => 'cat /etc/sysconfig/authconfig | egrep "^USELDAPAUTH=yes$|^USELDAP=yes$" | wc -l | egrep "^2$"',
|
||||
before => Augeas["sssd-conf"],
|
||||
require => [ Package["authconfig"], Package["sssd"], ],
|
||||
}
|
||||
}
|
||||
augeas { "sssd-conf":
|
||||
changes => [
|
||||
"set target[1]/ldap_tls_reqcert never",
|
||||
"set target[1]/enumerate true",
|
||||
"set target[1]/ldap_schema rfc2307bis",
|
||||
"set target[1]/ldap_group_member uniqueMember",
|
||||
],
|
||||
incl => "/etc/sssd/sssd.conf",
|
||||
lens => "MySQL.lns",
|
||||
notify => Service["sssd"],
|
||||
}
|
||||
service { "sssd":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
}
|
||||
}
|
||||
Ubuntu: {
|
||||
package { "ldap-auth-client":
|
||||
ensure => installed,
|
||||
|
|
Loading…
Add table
Reference in a new issue