简体   繁体   English

使用Java导入Active Directory用户和组

[英]Import Active Directory users and groups using Java

I'm implementing a profiled (user / group) web application and I need to import into my application database all users and groups of my Active Directory. 我正在实现一个概要分析的(用户/组)Web应用程序,并且需要将Active Directory的所有用户和组导入到应用程序数据库中。 I'm running this application on Apache Tomcat under Ubuntu Server. 我正在Ubuntu服务器下的Apache Tomcat上运行此应用程序。 I'd like to leave the import operation to some admin user direclty under my webapplication but, if it's not possible, I thought to use a .NET client to manager the user. 我想将导入操作留给Web应用程序下的某些管理员用户权限,但是,如果不可能,我想使用.NET客户端来管理用户。

I saw on some tuturial it's possible to reach the windows domain controller using java to authenticathe the user but, in that case, I don't need to authenticate the user, I just need to recognize the group of user using the property 我在某些教程中看到可以使用Java来验证用户的Windows域控制器,但是在那种情况下,我不需要验证用户,我只需要识别使用该属性的用户组即可

System.getProperty("user.name") System.getProperty(“ user.name”)

to retrieve the user. 检索用户。 I took a look to this tutorial: 我看了一下本教程:

http://gwallen.com/code/java/activedirectory.php http://gwallen.com/code/java/activedirectory.php

I tryied the first one but it doesn't works (LDAP: error code 49). 我尝试了第一个,但是它不起作用(LDAP:错误代码49)。

May you help me (suggesting me some tutorial or samples)? 您可以帮我吗(建议我一些教程或示例)?

thanks, 谢谢,
Andrea 安德里亚

If you want to query AD without password you need core Windows solution. 如果要查询不带密码的AD,则需要Windows核心解决方案。 Eg you can run dsquery command 例如,您可以运行dsquery命令

You can use Spring Security to do so. 您可以使用Spring Security来做到这一点。 Or just take a look at the classes which does so. 或者只是看一下这样做的类。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 Java 中使用 LDAPS 从 Active Directory 中获取用户 - Fetch users from Active Directory using LDAPS in java 如何使用Java在Active Directory中读取用户名 - How to read users names in Active Directory using Java 列出Active Directory中同一级别的两个组中的所有用户 - List all the users in two groups at the same level in Active Directory 无法使用Java创建活动目录用户 - Trouble creating active directory users with Java Java群组聊天应用程序:了解群组当前是否有活跃的用户 - Java Group Chat Application: Knowing if groups have users currently active 基于角色/域组 Active Directory 的 Java Spring 访问 - Java Spring access based on roles/domain groups Active Directory 如何使用Java从活动目录中的特定ou获取所有用户? - How to get all users from specific ou in active directory using java? 无法使用 LDAP 连接从 Java 后端检索 Active Directory 用户 [LDAP:错误代码 32 – 无此类对象] - Unable to retrieve Active Directory users from Java backend using LDAP connection [LDAP: error code 32 – No Such Object] Active Directory用户无法启动Java Webstart应用程序 - Active Directory users cannot launch java webstart apps 通过 Waffle (Java) 获取具有经过身份验证的身份的 Active Directory 用户列表? - Get list of Active Directory users with authenticated identity thru Waffle (Java)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM