从库中自定义创建的图像创建VM时出现问题.图像是域控制器.坚持运行(供应).我在sysprep等之后捕获了图像.
但是当我从一个无域控制器(独立)图像的图像创建VM时,它工作正常.
是因为服务器是域控制器吗?当您从映像创建VM时,Azure会要求您编写管理员用户名和密码,因此无法填写"domain\user"之类的域用户
任何的想法?
我终于束手无策了。我已经用谷歌搜索这个问题一周了。我已经尝试对我的 Mac (10.12 Sierra) 和域控制器 (Windows Server 2016) 进行故障排除,但距离解决问题还很遥远。
\n\n我的问题是,当使用 PHP 的ldap_connect()函数时,大约需要 5 秒才能得到响应。事情只是挂起 5 秒钟,然后我就成功连接了。复制此内容的确切命令(假设我的 DC 的 IP 地址为192.168.2.5):
$ldap = ldap_connect(\'ldap://192.168.2.5:389\');
我没有使用 SSL 或 TLS。这只是与 DC 的简单明文连接,其防火墙完全关闭。我最终在我的 DC 上安装了 Wireshark 以获取有关正在发生的情况的更多信息,我注意到了这一点:
\n\nNo. | Time | Source | Destination | Protocol | Length | Info
1 | 327 | 192.168.2.108 | 224.0.0.251 | MDNS | 83 | Standard query 0x0000 A Ryans-MacBook-Pro.local, "QU" question
2 | 328 | 192.168.2.108 …
我想使用以下方法搜索AD时可以指定域控制器:
$principalContext = New-Object 'System.DirectoryServices.AccountManagement.PrincipalContext'([System.DirectoryServices.AccountManagement.ContextType]::Domain, $DomainControllerIpAddress, $Container)
Run Code Online (Sandbox Code Playgroud)
如何使用DirectoryEntry或指定域控制器DirectorySearcher?
powershell active-directory domaincontroller directorysearcher
我想枚举一个域中的所有DC(当前用户和计算机都是其中的成员,也不在同一个林中).
我找到了这个好方法
Domain domain = Domain.GetCurrentDomain();
foreach (DomainController dc in domain.DomainControllers)
...
Run Code Online (Sandbox Code Playgroud)
但是,我无法弄清楚如何进行远程连接以获得正确的域上下文.
通过连接
DirectoryEntry child = new DirectoryEntry("LDAP://" + server + "/" + objectDn, userName, password);
Run Code Online (Sandbox Code Playgroud)
效果很好.但我不知道如何将它们结合在一起.
我似乎无法找到一种方法来获得带有C++和WinAPI的工作站(计算机)的DN.任何想法如何做到这一点?
PS.工作站连接到域控制器.
PS2.我需要计算机的DN而不是登录用户.
c++ winapi active-directory domaincontroller distinguishedname
我有一个应用程序,其中用户对我们的 Active Directory 进行身份验证:
private bool Authenticate()
{
using (var context = new PrincipalContext(ContextType.Domain, Environment.UserDomainName))
{
return context.ValidateCredentials(this.Username.Text.Trim(), this.Password.Text.Trim());
}
}
Run Code Online (Sandbox Code Playgroud)
它工作了好几年。现在,我们的 Windows 7 机器被 Windows 10 取代,一些用户收到此错误:
服务器无法处理目录请求。
在System.DirectoryServices.Protocols.ErrorChecking.CheckAndSetLdapError(的Int32误差)
在System.DirectoryServices.Protocols.LdapSessionOptions.FastConcurrentBind()
在System.DirectoryServices.AccountManagement.CredentialValidator.BindLdap(的NetworkCredential creds,ContextOptions contextOptions)
在System.DirectoryServices.AccountManagement。 CredentialValidator.Validate(String userName, String password)
at System.DirectoryServices.AccountManagement.PrincipalContext.ValidateCredentials(String userName, String password)
at DPI.FormLogin.Authenticate() in c:\Developing\Source\DPI\Client\DPI\FormLogin .cs:第 280 行
该错误仅对某些用户出现,而不是一直出现。也许这与现在在 Win 10 上比在 Win 7 上更严格的安全设置有关。
知道如何解决吗?如何查询当前连接的 LDAP 服务器?也许我们的服务器配置略有不同,问题仅限于可能配置错误的单个服务器。
希望这将是一个容易回答的问题.我在Grails中创建了一个名为player的类,其中包含以下信息:
class Player {
String steamId
String name
String portrait
static hasMany = {playerStatistics:PlayerStatistics}
static hasOne = {playerForumProfile:PlayerForumProfile}
}
Run Code Online (Sandbox Code Playgroud)
为了澄清,Player对象可以有一个PlayerForumProfile对象,但始终在PlayerForumProfile对象之前创建播放器对象.我的问题是访问与PlayerForumProfile类的控制器中的"hasOne"属性关联的playerForumProfile对象.我曾经假设这样做:
def playerForumProfileInstance = new PlayerForumProfile()
def playerInstance = Player.get(params.id)
playerForumProfileInstance = playerInstance.playerForumProfile
Run Code Online (Sandbox Code Playgroud)
会导致将与playerInstance对象关联的PlayerForumProfile对象拉入playerForumProfileInstance变量,但是当我尝试这个时,Grails会抛出一个错误,告诉我没有像playerForumProfile这样的属性.是否可以以这种方式访问hasOne属性的对象,还是需要做其他事情?
编辑:我也尝试修改Player类,因此它包含一个名为playerForumProfile的变量并编辑PlayerForumProfile,因此它有一个belongsTo声明,但这在运行我的应用程序时会导致空指针异常.
编辑:更多信息,我从头开始创建了一个新的grails应用程序并创建了它在Grails文档中显示的方式,它运行没有问题所以我认为它可能更容易只是启动一个新的应用程序和复制文件结束了.