可以工头注册一个新的主机与Active Directory?

我们使用Foreman和Puppet来pipe理我们的Unix系统,但Kerberos基础架构是通过Active Directory实现的(因为Exchange)。

用AD注册新引导的主机是一个手动过程,我们非常希望将其自动化。

看来, Foreman已经 (或曾经)支持joinAD-realm了一段时间,但我找不到任何实际的例子或教程。

工头对join领域有很好的支持 – 但是到目前为止唯一支持的提供商是FreeIPA。 它允许根据您的要求在领域手动注册引导主机。 尽pipe如此,您可以使用Active Directory进行尝试 ,并在http://projects.theforeman.org/issues/上报告失败。

请查看文档获取更多信息: https : //www.theforeman.org/manuals/1.12/#4.3.8Realm

我相信Puppet能够使用Powershell EXEC提供程序执行PowerShell命令。 您可以创build一个仅授权join个人电脑到该域的账户,并使用:

# Create Credentials $Script_Domain_Join_Credential = New-Object System.Management.Automation.PSCredential($Script_Domain_Join_Username,$Script_Domain_Join_Password) # Add the COmputer to Domain! Add-Computer -Domain my.domain.com -Credential $Script_Domain_Join_Credential -Force 

这将join计算机的域名。

编辑: https : //docs.puppet.com/puppet/4.5/reference/resources_exec_windows.html

 exec { 'test': command => 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -executionpolicy remotesigned -file C:\test.ps1', }