我有一个 Ubuntu 服务器,它能够针对我们的域对用户进行身份验证。我无法联系设置它的人,但我确实发现安装了这些软件包:
libaprtil1-ldap
libldap-2.4-2
samba
我们的服务器此时需要大约一分钟左右的时间来验证任何用户。我相信这是因为我们的一个 DC 几周前被禁用了。这会导致我使用的许多程序在成功验证之前超时。我不想卸载任何东西,因为我不想为我们的管理员做更多的工作。我只需要一些关于如何在此期间禁用它的建议,直到事情得到解决。
我需要支持需要访问 LDAP 服务器以定位 SMIME 密钥的 Mac 客户端。
由于密钥已经在 AD 中,而且我很容易在其中创建 RODC 或只读森林,将证书推送到其中,将未经身份验证的 LDAP 和 LDAP 公开到互联网是否可以接受?
我能想到的一个问题是目录收集攻击的 LDAP 形式,垃圾邮件发送者可以确定哪些地址有效,哪些无效。
作为经过身份验证的 Active Directory 用户,我可以运行它来获取域 GUID (objectGUID):
dsquery * "DC=lab,DC=local" -scope base -attr objectguid
Run Code Online (Sandbox Code Playgroud)
我可以在 Linux 中使用此命令从域控制器 labdc01 获取域(lab.local)SID,无需帐户(匿名):
# rpcclient -U% labdc01.lab.local -c lsaquery
Domain Name: LAB
Domain Sid: S-1-5-21-3869872838-1836277878-698564084
Run Code Online (Sandbox Code Playgroud)
如果我知道 GUID,我可以从 DNS 中获取它:
_ldap._tcp.4f904480-7c78-11cf-b057-00aa006b4f8f.domains._msdcs.lab.local。
如何匿名获取域 objectGUID(如上面的 SID 示例)?
我很难弄清楚如何在 apacheDS 中启用 nis 模式(我希望能够使用 posixGroup 和 posixAccount 类)。
我使用以下命令获取 LDAP 的所有用户的列表ldapsearch -x -LLL uid=* > result。
以下命令的结果如下格式
dn: uid=shahrukh,ou=People,dc=example,dc=com
uid: shahrukh
cn: shahrukh
sn: shahrukh
loginShell: /bin/bash
uidNumber: 1086
gidNumber: 1086
homeDirectory: /home/ldap/shahrukh
Run Code Online (Sandbox Code Playgroud)
有这些记录的完整列表。
我想在一个文件中列出所有 uid,以便只列出 uid 的值。
shahrukh
abc
xyz
....
....
....
Run Code Online (Sandbox Code Playgroud) 我正在尝试在 CentOS 6.7(类似于 RHEL 6.7)上的全新 OpenLDAP 安装中修改 LDAP 管理员密码。
我创建了一个名为change_ldap_password.ldif:
# Hash your password:
# slappasswd -h {SSHA} -s "my_password"
# I also tried {1}hdb instead of {0}config
dn: olcDatabase={0}config,cn=config
changetype: modify
add: olcRootPW
olcRootPW: {SSHA}YP8q2haCD1POSzQC3GAuBdrfaHh+/Y49
Run Code Online (Sandbox Code Playgroud)
当我以 root 身份运行以下命令时,出现访问错误:
# ldapmodify -x -W -D "cn=admin,dc=my_domain,dc=com" -f ./change_ldap_password.ldif
Enter LDAP Password:
modifying entry "olcDatabase={0}config,cn=config"
ldap_modify: Insufficient access (50)
Run Code Online (Sandbox Code Playgroud)
这是 ldapwhoami 的输出:
# ldapwhoami -x -W -D "cn=admin,dc=my_domain,dc=com"
Enter LDAP Password:
dn:cn=admin,dc=my_domain,dc=com
Run Code Online (Sandbox Code Playgroud)
这是在 cn=config 中对 olcRoot 进行 grepping 的结果:
# …Run Code Online (Sandbox Code Playgroud) 我们有几十台 Linux 服务器,还有几个开发人员,每个开发人员都涵盖了服务器的一部分。
目前每台服务器都有一个管理员账号,如果有人想管理那个服务器,他的公钥会被添加到服务器管理员账号的sshauthorized_keys中,这样他就可以访问和编辑这个服务器了。但不是一个好的解决方案:
所以我认为应该有更好的解决方案:
如果有人知道这样的解决方案吗?谢谢。
我有一个需要连接到 AD 的 rabbitmq 服务器。
配置是使用 puppet rabbitmq 模块设置的,有一些小的手动更改(日志级别):
% This file managed by Puppet
% Template Path: rabbitmq/templates/rabbitmq.config
[
{rabbit, [
{auth_backends, [rabbit_auth_backend_internal, rabbit_auth_backend_ldap]},
{tcp_listen_options,
[binary,
{packet, raw},
{reuseaddr, true},
{backlog, 128},
{nodelay, true},
{exit_on_close, false}]
},
{default_user, <<"guest">>},
{default_pass, <<"guest">>}
]},
{kernel, [
]}
,
{rabbitmq_management, [
{listener, [
{port, 15672}
]}
]}
,
% Configure the LDAP authentication plugin
{rabbitmq_auth_backend_ldap, [
{other_bind, anon},
{servers, ["ldap"]},
{user_dn_pattern, "CN=Rabbitmq LDAP User,OU=Service Accounts,DC=very,DC=chill,DC=domain"},
{use_ssl, false},
{port, 389},
{log, network}
]} …Run Code Online (Sandbox Code Playgroud) 当我在工作站上运行 gpupdate 时,出现以下错误。
Computer policy could not be updated successfully. The following errors were encountered:
The processing of Group Policy failed. Windows could not resolve the computer name. This could be caused by one of more of the following:
a) Name Resolution failure on the current domain controller.
b) Active Directory Replication Latency (an account created on another domain controller has not replicated to the current domain controller).
User Policy could not be updated successfully. The following errors were encountered: …Run Code Online (Sandbox Code Playgroud) LDAPS 正在通过 ldp.exe 以及 Windows 和 linux 系统上的许多其他程序运行,这些程序似乎不需要根证书。根本。某些使用 JSSE 的程序在将根 CA 和中间 CA 导入 cacerts 信任库后无法连接。
我已经测试过将 NTDS\Personal(来自 AD)中的 LDAPS 证书直接导入 cacerts,并且在某些使用 java 的应用程序中,这会导致安全 LDAP 工作。
在使用 java 并失败的程序中,当导入根证书时,我收到错误:
[Root 异常是 javax.net.ssl.SSLHandshakeException:sun.security.validator.ValidatorException:PKIX 路径验证失败:java.security.cert.CertPathValidatorException:签名检查失败]
如果我导入 LDAPS 证书,有时会收到错误消息:
[Root 异常是 javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: 证书不符合算法约束]
(即使在注释掉 java.security 之后)
或者它根据使用 JRE 的程序开始工作;然而,共同的障碍是 JRE 似乎普遍不喜欢基于错误的证书链。
MY CDP/AIA 可通过 HTTP 内部获得,所有证书均由受信任的私有内部 2 层 Windows PKI 签名。
openssl s_client -connect -showcerts domain:port
Run Code Online (Sandbox Code Playgroud)
返回正确的证书链,但也返回错误:
verify error:num=20:unable to get local issuer certificate
Run Code Online (Sandbox Code Playgroud)
这显然与 openssl 没有看到根证书有关,所以即使有-cafile附录,我也会得到同样的错误,这可能说明问题,但是根证书的证书链中的指纹与 相同,-cafile …