[英]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.