ldap

Rails LDAP login using net/ldap

[亡魂溺海] 提交于 2019-12-31 09:06:08
问题 I am trying to get LDAP authentication to work under Rails. I have chosen net/ldap since it's a native Ruby LDAP library. I have tried all possible stuff, specially examples from http://net-ldap.rubyforge.org/classes/Net/LDAP.html but still unable to get it work. Any ideas? 回答1: The best solution I managed to reach is a Model with the following: require 'net/ldap' class User < ActiveRecord::Base def after_initialize @config = YAML.load(ERB.new(File.read("#{Rails.root}/config/ldap.yml"))

Using active directory to authenticate users on intranet site

孤人 提交于 2019-12-31 08:14:17
问题 I have an 'intranet' site that I have built, which has a login system of its own (users register as new users, and use the username/password thereon to login to the site). However, now I want to extend it, and have the intranet site use the existing ActiveDirectory for authentication. This is what I am looking for, going forward - When a user access this intranet site ( http://intranetsite/mySite ), the user's domain credentials are validated against the active directory, and if the user's

How to add/update user data to LDAP Active Directory located on another server using PowerShell script?

 ̄綄美尐妖づ 提交于 2019-12-31 07:38:05
问题 I want to add/update data of Active Directory located on another server. I have server details but I don't know how to do it. However, I know how to add/update data if I run PowerShell Script from same server. Here is my code which work if I add/update data by PowerShell Script located to same server. Can anybody please suggest me how can I add/update data to Active Directory located on another server? Code # Import active directory module for running AD cmdlets Import-Module activedirectory

PHP LDAP debug output in PHP script

主宰稳场 提交于 2019-12-31 04:11:06
问题 I want to fetch debug information of an ldap connection in a PHP script (Windows Environment). To activate the debug output you have to use ldap_set_option calling ldap_connect: ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7); And it is necessary to run the from command line. Otherwise you wont get the debug output. In a reqeust this debug output is not shown. <?php // Set the ldap server $ldapurl = "foo.bar"; // Set debugging ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7); // connect to ldap

How to view stderr of PHP's ldap_* functions (with LDAP_OPT_DEBUG_LEVEL=7) from mod_php

ⅰ亾dé卋堺 提交于 2019-12-31 02:52:12
问题 I can run the following from the PHP 5.4.16 CLI: ldap_set_option(NULL, LDAP_OPT_DEBUG_LEVEL, 7); $conn = ldap_connect($hostname); ldap_bind($conn, $ldaprdn); And I will get a lot of debug output to stderr that starts like this: ldap_create ldap_url_parse_ext(ldaps://ldap.example.com) ldap_bind_s ldap_simple_bind_s ldap_sasl_bind_s ldap_sasl_bind ldap_send_initial_request ... That is great for debugging on the CLI. However, I need to debug from within Apache 2.2.15 mod_php because I am seeing

javax.naming.InvalidNameException: [LDAP: error code 34 - invalid DN]

孤者浪人 提交于 2019-12-30 23:03:10
问题 I'm a college student. Now, i'm doing a project that must use LDAP connection to authenticate the username and password of the user in log in process. So, my website is develop by use JSP. I try to solve the error of code but i can't. Did I makes some mistake on it? <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@ page import="java.util.*" %> <%@ page import="javax.naming.*" %> <%@ page import="java.util.regex.*" %> <%@ page import="javax.naming.directory.*" %> <%@ page import="java

.NET LDAP paths utilities (C#)

早过忘川 提交于 2019-12-30 10:39:08
问题 Is there a .NET library for LDAP paths manipulations? I would like to have something equivalent to System.IO.Path , allowing e.g. to do something like string ou1 = LDAPPath.Combine("OU=users","DC=x,DC=y"); string ou2 = LDAPPath.Parent("CN=someone,OU=users,DC=x,DC=y"); Otherwise, what's the common way to deal with LDAP distinguished names in .NET? To clarify my question : I'm not asking about "directory services in .NET" in general; I've already worked with that and done some programs to

How can I better query multiple domains in Active Directory using C#?

时光怂恿深爱的人放手 提交于 2019-12-30 07:15:47
问题 I am attempting to expand a LDAP / AD search from only searching in the currently logged in domain to searching all domains in the AD. The method takes in the string with the query and returns and return an LDAPInformation object. While I am asking, is there any better way to search for the name than in this way? It is user unfriendly due to needing to use wildcards if looking for a person by last name (example: Doe*). public static LDAPInformation[] GetGlobalAddressListVIAName(string

Python-LDAP integration [closed]

牧云@^-^@ 提交于 2019-12-30 07:15:04
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I need to integrate Python with LDAP. I just need to choose the best way to make Python talk to LDAP. I understand there are many ways

Python-LDAP integration [closed]

爷,独闯天下 提交于 2019-12-30 07:14:13
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I need to integrate Python with LDAP. I just need to choose the best way to make Python talk to LDAP. I understand there are many ways