samba: Added ad domain member support to samba::server.

This commit is contained in:
Timo Makinen 2014-01-19 14:13:09 +02:00
parent e0362e5215
commit 9fd6b1e38d
2 changed files with 20 additions and 2 deletions

View file

@ -66,7 +66,7 @@ class samba::server::configs {
# === Parameters
#
# $auth:
# Server authentication type. Valid values are tdbsam, ldap and
# Server authentication type. Valid values are tdbsam, ldap, ad and
# domain. Default is tdbsam.
# $description:
# Server description. Defaults to "Samba Server Version %v".
@ -78,7 +78,8 @@ class samba::server::configs {
# Array of NetBIOS names that host will be advertised. Defaults to
# [$::hostname].
# $workgroup:
# Workgroup or domain name.
# Workgroup or domain name. For ad authentication this needs to be
# full ad realm name.
#
# === Global variables
#
@ -183,6 +184,15 @@ class samba::server($names=[$::hostname], $auth="tdbsam",
require => Service["smb"],
}
}
"ad": {
exec { "net ads join":
command => "net ads join -U ${samba_join_user}%\"\${SECRET}\"",
environment => "SECRET=${samba_join_pass}",
path => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin",
unless => "net ads testjoin",
require => Service["smb"],
}
}
}
service { "smb":