dqz13288
2015-07-12 19:31
浏览 56
已采纳

如何使用Samba4 AD中的用户对PHP网站进行身份验证

I have seen a couple of websites / tutorials to "access files and folders" controlled by Samba4.

I want to ask if it is possible to use Samba as the database, and allow a user to enter their username and password, then using PHP, connect to the Samba users list to check these credentials and authenticate.

图片转代码服务由CSDN问答提供 功能建议

我见过几个由Samba4控制的“访问文件和文件夹”的网站/教程。

我想询问是否可以使用Samba作为数据库,并允许用户输入他们的用户名和密码,然后使用PHP,连接到Samba用户列表以检查这些凭据并进行身份验证。

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • doudang2537 2015-07-12 20:07
    已采纳

    I did this looong time ago with samba3 and PHP4. Sorry but I can't give you details right now but I used this: http://uranus.chrysocome.net/linux/php/php_smbauth.htm

    Code will be like:

    smbauth($username, $password, $primary_svr, $secondary_svr, $domain);
    

    I didn't see support for PHP5 or if it is possible to install it via apt. Anyway, with the source and administrative privileges you can compile it.

    点赞 打赏 评论

相关推荐 更多相似问题