ldap

详解Django-auth-ldap 配置方法

一世执手 提交于 2020-04-07 11:38:58
使用场景 公司内部使用Django作为后端服务框架的Web服务,当需要使用公司内部搭建的Ldap 或者 Windows 的AD服务器作为Web登录认证系统时,就需要这个Django-auth-ldap第三方插件 插件介绍 Django-auth-ldap是一个Django身份验证后端,可以针对LDAP服务进行身份验证。有许多丰富的配置选项可用于处理用户,组和权限,便于对页面和后台的控制 插件介绍地址:Django-auth-ldap 安装方法 注意:需先正确安装python3环境、pip3 和 Django环境 前提: 需要先安装python-ldap > = 3.0 第一步:安装Django-auth-ldap pip install django-auth-ldap 第二步:在setting.py中配置django-auth-ldap 模块 要在Django项目中使用auth认证,请将django_auth_ldap.backend.LDAPBackend添加 到AUTHENTICATION_BACKENDS。不要向INSTALLED_APPS添加任何内容。 添加完效果如下: AUTHENTICATION_BACKENDS = [ 'django_auth_ldap.backend.LDAPBackend' , ] 第三步:在django项目的settings

cas+openldap实现单点登录认证一

孤街浪徒 提交于 2020-04-07 10:26:31
1、下载cas server:http://www.jasig.org/cas/download(本例使用的版本为:cas-server-3.5.2-release.zip) 2、下载spring ldap包(本例使用版本为:spring-ldap-1.3.1.RELEASE-all.jar) 3、部署cas server 修改配置文件:F:\sso\tomcat-cas\webapps\cas\WEB-INF\deployerConfigContext.xml 4、定义openldap认证地址:<beans>跟节点下增加bean:ContextSource 的配置 <bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource"> <property name="pooled" value="false"/> <property name="url" value="ldap://192.168.10.237:389" /> <property name="userDn" value="cn=Manager"/> <property name="password" value="secret"/><!-- 自己openldap的密码 --> <property name=

验证LDAP中的EMAIL地址是否存在

故事扮演 提交于 2020-04-07 09:01:55
客户要做个LDAP验证,只需要输入一个mail地址,检查下只要这个地址存在于某个组里就通过,否则就不通过。代码如下 using System;using System.Collections.Generic;using System.Configuration;using System.DirectoryServices;namespace LdapLogin{ public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { AjaxPro.Utility.RegisterTypeForAjax(typeof(_Default)); } [AjaxPro.AjaxMethod] public bool CheckLadpAccount(string path, string username, string password) { using (DirectoryEntry entry = new DirectoryEntry()) { entry.Path = path; //该用户是一个公共用户可以用来登录,也可以改成用mail来登录 entry.Username = "orcacm"; entry.Password =

配置ZABBIX支持LDAP认证

狂风中的少年 提交于 2020-04-06 05:16:40
配置如下: 1、打开 ZABBIX 管理WEB界面; 2、导航到 Administration,Authentication页面; 3、继续导航到 LDAP settings 配置页面; 4、勾选 Enable LDAP authentication,激活 LDAP 认证; 5、执行如下配置,并点击 Update 更新: # 域控的主机地址 LDAP host:192.168.1.1 # LDAP 连接端口 Port:389 # FQDN 路径 Base DN:OU=Users, DC=test, DC=com # sAMAccountName 是在域中用户的帐号名称字段 Search attribute:sAMAccountName # 连接到 LDAP 的帐号 Bind DN:third Case sensitive login:勾选 # 连接到 LDAP 的帐号密码 Bind password:<third帐号的密码> 进行测试: 在 Login 和 User password 中填写 域用户的帐号和密码,点击 Test 控制进行测试。 页面顶端显示,表示配置成功 LDAP login successful 后续工作: 回到 Authentication 选项卡,选择 LDAP 认证。 另外需要注意的是,此处配置完成后,仍然需要在ZABBIX的用户管理中

Read msExchResourceMetaData property of a UserID

百般思念 提交于 2020-03-28 06:43:02
问题 How to read msExchResourceMetaData property from Active Directory of an userID. I need to determine if the entered ID is not of type ROOM. I need to acheive this using C# without powershell script. 回答1: This blogpost fixed my issue. Thanks to Glen. http://gsexdev.blogspot.com.au/2007/04/webservice-to-find-room-and-equipment.html 来源: https://stackoverflow.com/questions/36704536/read-msexchresourcemetadata-property-of-a-userid

Read msExchResourceMetaData property of a UserID

ぐ巨炮叔叔 提交于 2020-03-28 06:42:11
问题 How to read msExchResourceMetaData property from Active Directory of an userID. I need to determine if the entered ID is not of type ROOM. I need to acheive this using C# without powershell script. 回答1: This blogpost fixed my issue. Thanks to Glen. http://gsexdev.blogspot.com.au/2007/04/webservice-to-find-room-and-equipment.html 来源: https://stackoverflow.com/questions/36704536/read-msexchresourcemetadata-property-of-a-userid

SSLSocketFactory in Java, LDAP network connection

心不动则不痛 提交于 2020-03-23 08:05:31
问题 My question is similar to: SSLSocketFactory in java I need to set a custom SSLSocketFactory...except I do NOT have an https connection (it's LDAPS), so can't use: HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); ...to set the SSLSocketFactory. I have an SSLContext object initialized but when I make the LDAP connection the default SSLContext is called automatically since my custom one is not set: dirContext = new InitialDirContext(env); // <-- reverts to default ssl

求助:hmailserver+roundcube启用密码插件后,用户无法修改密码问题

旧时模样 提交于 2020-03-22 23:40:54
环境 windows 8 apache:httpd-2.4.25-x64-vc14-r1 mysql:5.6 php:php-7.1.5-Win32-VC14-x64 hmailserver:hMailServer-5.6.7-B2407 roundcube:roundcubemail-1.2.5-complete 搭建成功,可以正常使用,收发邮件,但就是在修改密码时发生错误,提示“无法保存新密码”。而我又发现,但新密码与旧密码相同时,则提示修改密码成功。无论怎样修改配置文件中的SQL语句,只要新旧密码一样,都会提示修改成功,貌似UPDATE语句根本没有发生作用。目前纠结困惑中,网上查的方法都试过了,均无结果,求大神指点,不胜感激。 以下密码插件配置config.inc.php: <?php // Password Plugin options // ----------------------- // A driver to use for password change. Default: "sql". // See README file for list of supported driver names. $config['password_driver'] = 'sql'; // Determine whether current password is

从零构建ipa-server.实现ldap+kerberos域用户验证(开放防火墙,命令版)

僤鯓⒐⒋嵵緔 提交于 2020-03-18 13:51:57
图形配置方法请看上篇文章 1,实验环境: 一台主机物理主机两台虚拟机。 物理主机的ip:192.168.9.6/24 gw:192.168.9.254 dns:8.8.8.8 一台虚拟机(server)网卡类型为自动桥接:ip:192.168.9.4/24 gw:192.168.9.254 dns不用配置,装ipa-server 会自动配置 一台虚拟机(client)网卡类型为自动桥接:ip:192.168.9.5/24 gw:192.168.9.254 dns:192.168.9.4 2,IPA-server服务安装前条件: 1,必须要有完整的主机名 2,一个静态的ip地址 3,能够对主机名做解析(正向和反向解析) 4,hosts文件也要对主机名做解析。不能解析到127.1 5,开通防火墙规则和服务 6, 做时间ntp同步 3,步骤 1,设置主机名 [root@localhost ~]# hostnamectl set-hostname server.zhuxu.vip``` [root@localhost ~]# hostname server.zhuxu.vip 2,一个静态的ip地址上面准备工作已经完成 3,能够对主机名做解析(正向和反向解析) 装ipa-server 会自动配置 4,hosts文件也要对主机名做解析。不能解析到127.1 [root@server ~]#