Added support for storing LDAP bind password for samba.
This commit is contained in:
parent
13d05c52ac
commit
adfbf11751
1 changed files with 22 additions and 0 deletions
|
@ -107,3 +107,25 @@ class samba::domainmember {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Set LDAP auth password to samba.
|
||||||
|
#
|
||||||
|
# === Global variables
|
||||||
|
#
|
||||||
|
# $samba_ldap_pass:
|
||||||
|
# Password to set in samba secrets.
|
||||||
|
#
|
||||||
|
class samba::ldap {
|
||||||
|
|
||||||
|
include samba::server
|
||||||
|
|
||||||
|
exec { "smbpasswd -w":
|
||||||
|
command => "smbpasswd -w '${SECRET}'",
|
||||||
|
environment => "SECRET=${samba_ldap_pass}",
|
||||||
|
path => "/bin:/usr/bin:/sbin:/usr/sbin",
|
||||||
|
unless => "tdbtool /etc/samba/secrets.tdb keys | fgrep 'SECRETS/LDAP_BIND_PW/'",
|
||||||
|
require => Package["samba"],
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue