如何在不知道密码的情况下获取另一个用户的 WindowsIdentity?

发布于 2024-08-03 07:07:13 字数 133 浏览 4 评论 0原文

我试图拦截 WindowsAuthenticationModule 以作为另一个用户登录应用程序,但如果不知道他的密码,我无法创建新的 WindowsIdentity。该代码将在管理员权限下运行,那么,有没有办法在没有密码的情况下获取用户“登录令牌”?

I'm trying to intercept WindowsAuthenticationModule to login into application as another user, but I cannot create new WindowsIdentity without knowing his password. The code will run under administrator privilegies, so, is there any way how to get user 'Login token' without his password?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

幸福不弃 2024-08-10 07:07:13

从 Windows Server 2003 及更高版本开始,您可以执行所谓的“协议转换”。

确实需要管理员权限,并且根本不建议您使用管理员权限运行网站,因此如果您绝对必须这样做,您应该考虑这一点将功能块转移到以更高权限模式运行的单独进程中。 Keith Brown 提供了有关该主题的更多信息。

你应该需要这个功能,所以除非你绝对确定你在做什么,否则我建议你写另一个SO问题来概述你的一般挑战是什么,看看是否有人可以提出一些更好的选择。

From Windows Server 2003 and forward, you have the ability to perform what is called Protocol Transition.

It does require Administrator privileges, and it is not at all recommended that you run a web site with admin privileges, so if you absolutely must do this, you should factor this particular piece of functionality out into a separate process that runs in higher privilege mode. Keith Brown has more information on the subject.

It is very rare that you should ever need this functionality, so unless you are absolutely certain about what you are doing, I suggest that you write another SO question that outlines what your general challenge is, and see if someone can suggest some better alternatives.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文