大雀软件园

首页 软件下载 安卓市场 苹果市场 电脑游戏 安卓游戏 文章资讯 驱动下载
技术开发 网页设计 图形图象 数据库 网络媒体 网络安全 站长CLUB 操作系统 媒体动画 安卓相关
当前位置: 首页 -> 技术开发 -> ASP专区 -> 添加服务器操作员, from zdtips, in english

添加服务器操作员, from zdtips, in english

时间: 2021-07-31 作者:daque

adding server operatorsoccasionally, you might want to add server operators for the ftp- orwww-server with adsi. the vbscript below (which can also be translated toasp) shows an sample way of accomplishing this task.'' addadmin.vbs - add an administrator to ftp, w3, nntp or smtp service'' usage: addadmin <ftp | w3 | nntp | smtp> <user>''without changes the script must run on the local webserver. 'user in the form <domain>\<user>'option explicitdim iisdim acldim sddim acedim accdim argdim netset arg = wscript.argumentsif arg.count < 1 thenwscript.echo "usage: addadmin <ftp | w3 | nntp | smtp><user>"wscript.quitend ifset net = createobject("wscript.network")select case ucase(arg(0))case "ftp" set iis = getobject("iis://" & net.computername& "/msftpsvc/1")case "w3" set iis = getobject("iis://" & net.computername& "/w3svc/1")case "nntp" set iis = getobject("iis://" & net.computername& "/nntpsvc/1")case "smtp" set iis = getobject("iis://" & net.computername& "/smtpsvc/1")case elsewscript.echo "usage: addadmin <ftp | w3 | nntp | smtp><user>"wscript.quitend selectset sd= iis.adminaclset acl = sd.discretionaryaclif arg.count = 2 thenset ace = createobject("accesscontrolentry")ace.trustee = arg(1)ace.accessmask = &hbi did not find the real permissions (actrl_??? bits) description foraccessmask, but i've copied it from a manual added entry. you can see thebits running this script without specifying an useracl.addace aceiis.adminacl = sdiis.setinfoelsefor each ace in aclwscript.echo ace.trustee & " (0x" &hex(ace.accessmask) & ")"nextend if

热门阅览

最新排行

Copyright © 2019-2021 大雀软件园(www.daque.cn) All Rights Reserved.