如何在 Windows Subsystem for Linux (WSL) 中启用 Active Directory/LDAP/Kerberos? [英] How do I enable Active Directory/LDAP/Kerberos in Windows Subsystem for Linux (WSL)?

查看:29
本文介绍了如何在 Windows Subsystem for Linux (WSL) 中启用 Active Directory/LDAP/Kerberos?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个使用 Active Directory 进行身份验证的 PHP 应用程序.我正在尝试使用适用于 Linux 的 Windows 子系统 (WSL) 进行开发.启动 WSL 时,您将创建一个具有不同密码的本地用户.我想弄清楚如何使用 AD 来代替.我发现了一个问题(https://superuser.com/questions/1248278/wsl-and-ad-domain-account),但唯一的回应是一条评论,对我来说并没有完全联系起来.它提到了配置 IdM 提供程序,但我不清楚这是如何在 WSL 中完成的.

I am working on a PHP application that uses Active Directory for authentication. I am trying to use the Windows Subsystem for Linux (WSL) to do development. When you start WSL, you create a local user with a different password. I am trying to figure out how to use AD instead. I found one question (https://superuser.com/questions/1248278/wsl-and-ad-domain-account), but the only response was a comment that doesn't quite connect the dots for me. It mentions configuring a IdM provider, but it isn't clear to me how this is done in WSL.

有谁知道我如何在 WSL 中为用户/登录使用 Active Directory?

Does anyone know how I can use Active Directory for users/logins in the WSL?

推荐答案

这不是一个完整的答案,但是 wsl 1 没有使用 sssd 完成它所需的套接字支持.下面是 sssd -i 上的 strace 片段.所以理论上我认为你应该能够用 wsl 2 做到这一点.

This is not a full answer, but wsl 1 doesn't have the socket support needed to do it with sssd. A snippet from strace on sssd -i is found below. So in theory I would assume you should be able to do this with wsl 2.

11:12:22 bind(14, {sa_family=AF_NETLINK, nl_pid=-2092926910, nl_groups=00000000}, 12) = 0
11:12:22 getsockname(14, {sa_family=AF_NETLINK, nl_pid=-2092926910, nl_groups=00000000}, [12]) = 0
11:12:22 setsockopt(14, SOL_SOCKET, SO_PASSCRED, [1], 4) = 0
11:12:22 setsockopt(14, SOL_NETLINK, NETLINK_ADD_MEMBERSHIP, [1], 4) = -1 EINVAL (Invalid argument)
(2021-08-09 11:12:22): [sssd] [nlw_group_subscribe] (0x0020): Unable to add membership: Invalid input data or parameter

虽然我还没有测试过在 wsl 1.0 上注册类似领域的东西.

Though I haven't tested with enrolling with something like realm on wsl 1.0.

这篇关于如何在 Windows Subsystem for Linux (WSL) 中启用 Active Directory/LDAP/Kerberos?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆