简体   繁体   English

将用户和密码从Active Directory导出到PHP

[英]Export users and passwords from Active directory into PHP

I am developing a web application for my university project this summer and I am looking for some advice, The web application is to be deployed in to a windows environment that has around 500 users. 今年夏天,我正在为我的大学项目开发​​一个Web应用程序,我正在寻找一些建议。该Web应用程序将部署到具有约500个用户的Windows环境中。 The users will need to login before they can access the web application, this is where my first problem appears. 用户需要先登录才能访问Web应用程序,这是我遇到的第一个问题。

Do I need a way to export the users from active directory with their passwords on a daily basis. 我是否需要一种每天从活动目录中导出用户及其密码的方法? However I know that passwords are stored as a hash not clear text so id have to mimic the hashing in my web app. 但是我知道密码存储为哈希而不是明文,因此id必须模仿我的Web应用程序中的哈希。 So do I use LDAP to authenticate the users for me? 那么,我是否使用LDAP为我认证用户? I would appreciate some advice of maybe a link to a resource that anyone knows that would be worth me reading. 我会建议您提供一些建议,也许是指向任何人都知道的资源链接的内容,这值得我阅读。

Note. 注意。 The web application will be made in PHP with a sql database running on a windows server inside the same domain. 该Web应用程序将使用PHP制成,并在同一域内的Windows服务器上运行sql数据库。

Thanks 谢谢

PHP has an LDAP module that allows you to interface the Active Directory without exporting it. PHP具有LDAP模块 ,该模块允许您连接Active Directory而不导出它。

Here is an example of implementing an LDAP authentication through php: http://code.activestate.com/recipes/101525-ldap-authentication/ 以下是通过php实现LDAP身份验证的示例: http : //code.activestate.com/recipes/101525-ldap-authentication/

Since PHP has libraries to assist you with interacting with LDAP already then that might be the way to go. 由于PHP已经具有可帮助您与LDAP进行交互的 ,因此这可能是可行的方法。 Exporting and managing users yourself sounds like reinventing the wheel. 自己导出和管理用户听起来像是在重新发明轮子。

Just contact the auth server using PHP::LDAP . 只需使用PHP :: LDAP与身份验证服务器联系。 This blog post shows a good example. 这篇博客文章显示了一个很好的例子。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM