【问题标题】:IIS 7 - Change the order to NTLM authentication and the NegotiateIIS 7 - 将顺序更改为 NTLM 身份验证和协商
【发布时间】:2014-07-23 02:08:29
【问题描述】:

使用以下命令,我可以将“协商”和“NTLM”作为提供程序添加到 Windows 身份验证

C:\Windows\SysWOW64\inetsrv\appcmd set config "Default Web Site/LIT/My.Site" -section:system.webServer/security/authentication/windowsAuthentication /+providers.[value='Negotiate'] /提交:apphost

C:\Windows\SysWOW64\inetsrv\appcmd set config "Default Web Site/LIT/My.Site" -section:system.webServer/security/authentication/windowsAuthentication /+providers.[value='NTLM'] /提交:apphost

我的问题是使用命令行如何更改提供程序的顺序。例如我想要“NTLM”然后“协商”

【问题讨论】:

    标签: iis windows-authentication provider


    【解决方案1】:

    Lex Li 说的是一种方法,但还有更多方法可以实现: 首先,按照您希望设置提供程序的顺序运行命令。添加的第一个身份验证方法将位于顶部。因此,如果您在创建站点后运行命令行并且未设置任何提供程序,请更改当前提到的 appcmd 的运行顺序。

    其次,您只能删除您想成为第二的身份验证提供者,然后重新添加该提供者,因为删除并重新添加它会自动成为第二个:

    C:\Windows\SysWOW64\inetsrv\appcmd set config "Default Web Site/LIT/My.Site" -section:system.webServer/security/authentication/windowsAuthentication /-providers.[value='Negotiate'] /commit:apphost
    
    C:\Windows\SysWOW64\inetsrv\appcmd set config "Default Web Site/LIT/My.Site" -section:system.webServer/security/authentication/windowsAuthentication /+providers.[value='Negotiate'] /commit:apphost
    

    第三,你可以按照 Lex Li 所说的去做: 删除所有提供者:

    C:\Windows\SysWOW64\inetsrv\appcmd set config "Default Web Site/LIT/My.Site" -section:system.webServer/security/authentication/windowsAuthentication /-providers.[value='Negotiate'] /commit:apphost
    
    C:\Windows\SysWOW64\inetsrv\appcmd set config "Default Web Site/LIT/My.Site" -section:system.webServer/security/authentication/windowsAuthentication /-providers.[value='NTLM'] /commit:apphost
    

    按正确顺序添加:

    C:\Windows\SysWOW64\inetsrv\appcmd set config "Default Web Site/LIT/My.Site" -section:system.webServer/security/authentication/windowsAuthentication /+providers.[value='NTLM'] /commit:apphost
    
    C:\Windows\SysWOW64\inetsrv\appcmd set config "Default Web Site/LIT/My.Site" -section:system.webServer/security/authentication/windowsAuthentication /+providers.[value='Negotiate'] /commit:apphost
    

    选择权在你。

    【讨论】:

      【解决方案2】:

      把它们都去掉,然后按顺序添加。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-01-10
        • 1970-01-01
        • 2014-08-18
        • 1970-01-01
        • 2016-06-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多