posts - 72, comments - 66, trackbacks - 0, articles - 0

About SPN

Posted on 2008-06-23 17:17 Fingki.li 阅读(550) 评论(0)  编辑  收藏 所属分类: About security
要使用 Kerberos 身份验证,某种服务必须注册其名称(称为服务主体名称 (SPN)),以及运行该服务所使用的帐户。默认情况下,Active Directory® 目录服务注册 NetBIOS 或者计算机名,并允许计算机帐户使用 Kerberos。如果要以不同帐户或使用不同名称(例如,如果计算机使用其他的 WINS 或 DNS 名)运行服务,那么您可以使用 Setspn.exe 命令行工具设置 SPN。要设置 SPN,您必须是域管理员。
Setspn.exe 命令行实用程序可以在 Windows Server 2003 CD-ROM 内的支持工具包中获得。在window2003中可以运行support tools中的suptools.msi来安装。

使用 Setspn.exe

下面是使用 Setspn.exe 命令行实用程序的基本语法,其中“accountname”可以是单独的名称,也可以是域\名称。

setspn [parameter] accountname



Setspn.exe 可以使用下列参数:

参数 功能 示例
-R 重置 HOST ServicePrincipalName setspn -R computername
-A 添加任意的 SPN。 setspn -A SPN computername
-D 删除任意的 SPN。 setspn -D SPN computername
-L 列出已注册的 SPN。 setspn -L SPN computername

下面的示例使用 Setspn.exe 命令行实用程序注册以 Domain\UserAccount 运行的应用程序池:

SETSPN.EXE -A HOST/<your computer name> Domain\UserAccount

下面的示例注册 SPN“HOST/daserver1”和“HOST/{DNS of daserver1}”:

setspn -R daserver1

下面的示例为计算机“daserver1”注册 SPN“http/daserver”:

setspn -A http/daserver daserver1

下面的示例从计算机“daserver1”删除 SPN“http/daserver”:

setspn -D http/daserver daserver1


只有注册用户登录后才能发表评论。


网站导航: