Fixed ldap password change on centos 6.
This commit is contained in:
parent
047dcbd2bd
commit
9a85a1217f
1 changed files with 11 additions and 2 deletions
|
@ -26,11 +26,12 @@ class ldap::auth inherits ldap::client {
|
|||
exec { "authconfig --enableldap --enableldapauth --ldapserver='${ldap_uri}' --ldapbasedn='${ldap_basedn}' --update":
|
||||
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||
unless => 'cat /etc/sysconfig/authconfig | egrep "^USELDAPAUTH=yes$|^USELDAP=yes$" | wc -l | egrep "^2$"',
|
||||
before => [ Augeas["pam-ldap-conf"],
|
||||
before => [ Augeas["nslcd-conf"],
|
||||
Augeas["pam-ldap-conf"],
|
||||
File["/etc/openldap/ldap.conf"], ],
|
||||
require => Package["nss-pam-ldapd"],
|
||||
}
|
||||
augeas { "pam-ldap-conf":
|
||||
augeas { "nslcd-conf":
|
||||
changes => [ "set pagesize 500",
|
||||
"set ssl on",
|
||||
"set tls_reqcert never", ],
|
||||
|
@ -41,6 +42,14 @@ class ldap::auth inherits ldap::client {
|
|||
lens => "Spacevars.simple_lns",
|
||||
notify => Service["nslcd"],
|
||||
}
|
||||
augeas { "pam-ldap-conf":
|
||||
changes => [ "set ssl on",
|
||||
"set pam_password exop", ],
|
||||
onlyif => [ "get ssl != on",
|
||||
"get pam_password != exop", ],
|
||||
incl => "/etc/pam_ldap.conf",
|
||||
lens => "Spacevars.simple_lns",
|
||||
}
|
||||
service { "nslcd":
|
||||
ensure => running,
|
||||
enable => true,
|
||||
|
|
Loading…
Add table
Reference in a new issue