问题标签 [netldap]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
perl - 无法使用 Perl 绑定到 Active Directory
我刚刚安装了 Net::LDAP,但我无法对 AD 服务器进行身份验证。
我得到的错误是:
80090308:LdapErr:DSID-0C0903A9,注释:AcceptSecurityContext 错误,数据 52e,v1db0 位于 ./ldap.pl 第 11 行,第 751 行。
ruby - net-ldap 用密码创建用户
我正在尝试使用已使用net-ldap
gem 设置的密码创建一个 AD 帐户。我能够很好地连接到服务器。而且我也可以在不传递:unicodepwd
属性的情况下添加新用户,但是在创建新用户时没有设置密码。当我传递该属性时,不会创建用户并且它失败error code 53
并显示以下消息Unwilling to perform
。如果我在创建用户密码后尝试替换用户密码,也会遇到同样的错误。我遇到了许多潜在的答案,但没有一个对我有用。
当我创建用户并且不必通过 gui 访问它来更新密码时,如何为用户设置密码?任何帮助表示赞赏
谢谢
更新
一旦我以不同的方式对字符串进行编码并连接到 SSL 端口 636 而不是默认端口 389,我就能够让它工作。使用encode
是问题,似乎它错误地编码了密码。
这是我的新连接
以及我用来编码密码的方法
希望这对将来的人有所帮助
perl - 如何使用 Net::LDAP 修改布尔 LDAP Active Directory 属性?
我可以成功绑定到 AD LDAP,并修改和创建对象。
但是,如果我想更新或设置“布尔”类型的属性,则会收到以下错误:
00000057:LdapErr:DSID-0C090C3E,注释:属性转换操作出错,数据0,v1db1
这是一段负责的 Perl 代码:
]);
问题是最后三个属性;如果它们被注释掉,那么它就可以工作。我尝试使用 0 和 1 而不是 'TRUE' 和 'FALSE' 但我遇到了同样的问题。似乎Net::LDAP
代码调用Convert::ASN1
类型为string
orint
不正确;它应该使用“布尔”,但我看不出如何让它做到这一点。
ruby-on-rails - Ruby on Rails - 基于 LDAP 的身份验证
这是我关于 SO 的第一篇文章,但我已经阅读了很长时间 :) 我目前正在为 Rails 应用程序进行 LDAP 身份验证。我正在使用 ruby Net::LDAP 库 - 我能够使用技术帐户成功绑定和登录并搜索特定用户。我不知道该怎么做,如何用他在登录时提供的密码验证找到的 AD 用户密码。由于 AD 策略的限制,我只能从技术帐户进行绑定 - 因此无法在此处使用将每个登录用户绑定到 AD 的使用解决方案。谢谢你的帮助
perl - 使用 Net::LDAPs 和 Net::LDAP::Control::Paged
我正在尝试将 Net::LDAPs 与 Net::LDAP::CONTROL::PAGED 一起使用,以通过 privlidged 绑定返回许多记录,但到目前为止,我失败了,很惨。我过去广泛使用过这个 Net::LDAPs,但我从来没有找到任何说明它与 Net::LDAP:Control::Paged 兼容的文档。我发现的一切都与 Net::LDAP 有关。
我得到的错误消息是: Undefined subroutine &main::process_entry called at /usr/local/share/perl/5.20.2/Net/LDAP/Search.pm line 55, line 755
这是我的代码:
perl - MS AD2008 - 无法在下次登录时使用 Perl Net::LDAPS 和 userAccountControl 属性强制更改密码
我正在使用 perl Net::LDAPS 连接到 Active Directory 2008 域控制器并尝试设置“用户下次登录时必须更改密码”帐户选项,但它不起作用。
我能够创建、修改、删除和移动不同的对象,但我无法获取更改密码设置!
这是我正在尝试做的,但它不起作用:
注意:我正在为 Net::LDAPS 使用一个自写的类包装器,下面的代码被归结为我正在尝试做的事情。
我正在绑定域管理员帐户,并且我已验证 $DN_OF_USER_ACCOUNT 是正确的。
ruby - 使用多个证书绑定到 LDAP。在红宝石中
我正在使用https://github.com/ruby-ldap/ruby-net-ldap gem 连接/绑定到 LDAP
上面的代码导致
ruby-2.2.2/gems/net-ldap-0.12.1/lib/net/ldap/connection.rb:47:in open_connection': SSL_connect returned=1 errno=0 state=error: certificate verify failed (Net::LDAP::Error)
我觉得这与多个证书有关,但不确定。
perl - Perl Net::LDAP:使用当前登录进行身份验证
我想绑定一个 LDAP 连接而不给脚本一个用户名和密码。目前我正在向用户询问他的密码并绑定连接:
但这不是我想要的。我希望脚本自动将 LDAP 连接与运行脚本的用户的凭据绑定。是否有机会获取当前用户的登录信息以将其传递给绑定运算符?
我正在使用 ActiveDirectory 的 Windows 环境中工作。
ruby - 如何在 JRuby 中使用 Net::LDAP
我通过 RVM 在 Ubuntu 机器上使用 Ruby 和 JRuby。
OpenLDAP 通过 Ruby 代码与 Net::LDAP gem 完美地连接并执行 CRUD 操作。
这是代码:
当我使用 JRuby 执行相同的代码时,它会引发错误:
ruby - Cannot enable active directory user using net-ldap
We're experiencing an issue trying to enable a active directory user(windows server 2012 r2
) using the net/ldap
library.
Setup
First, we create a user via this method:
This creates the user, and by default sets their userAccountControl
attribute to 546
(which is what we want), when inspected in active directory this shows as:
0x222 (ACCOUNTDISABLE|PASSWD_NOTREQD|NORMAL_ACCOUNT)
.
Problem
Later we want to enable that user so we call:
However, if I print @connection.get_operation_result
I get:
<OpenStruct code=53, error_message="0000052D: SvcErr: DSID-031A12D2, problem 5003 (WILL_NOT_PERFORM), data 0\n\u0000", matched_dn="", message="Unwilling to perform">
With this method we want the userAccountControl
to equal 512
, which is the equivalent of 0x200 (NORMAL_ACCOUNT)
.
Things I've Tried
notes: connection is over SSL (LDAPS), and bound to an admin AD account.
- this answer
- using
#modify
instead of#replace_attribute
in theenable_user!
method. - passing the hex values instead of the integer representation.
- perform the same modification using apache directory studio.
One interesting thing I did notice, is that I can modify useraccountcontrol
to 514
which is:
0x202 (ACCOUNTDISABLE|NORMAL_ACCOUNT)
So, it seems I can modify this attribute as long as it's remaining disabled, as soon as I try to change to enabled is when I see the error.