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.

  • 写回答

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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 socket通信实现多人聊天室疑惑
  • ¥15 DEV-C++编译缺失
  • ¥33 找熟练码农写段Pyhthon程序
  • ¥100 怎么让数据库字段自动更新
  • ¥15 antv g6 力导向图布局
  • ¥15 quartz框架,No record found for selection of Trigger with key
  • ¥15 锅炉建模+优化算法,遗传算法优化锅炉燃烧模型,ls-svm会搞,后面的智能算法不会
  • ¥20 MATLAB多目标优化问题求解
  • ¥15 windows2003服务器按你VPN教程设置后,本地win10如何连接?
  • ¥15 求一阶微分方程的幂级数