CFEXECUTE 分配它以管理员权限运行 [英] CFEXECUTE assigning it to run with administrator rights

查看:21
本文介绍了CFEXECUTE 分配它以管理员权限运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 cfexecute 更改活动目录的密码.我的页面上唯一的代码是这样的(用户名和新密码都填好了):

I am trying to change a password with active directory using cfexecute. The only code on my page is this (username and the new password are filled in):

<cfexecute
name="c:windowssystem32cmd.exe"
arguments="NET USER username password /domain"
outputfile="C:UsersadministratorDesktop	est.txt"
timeout="90">
</cfexecute>

当我尝试通过我的电脑上的 Dreamweaver 运行此代码时,我的浏览器中的选项卡即使在 5 分钟后仍然保持旋转...我关闭选项卡转到登录的服务器并且 text.txt 在那里是空的.但是我无法删除它,因为它说coldfusion.exe正在使用它????它也没有更改用户密码.

When I tried running this code through dreamweaver on my pc the tab in my browser just kept spinning even after 5 min... I closed the tab went to the server logged in and the text.txt was there empty. But I am unable to delete it because it says coldfusion.exe is using it???? Also it did not change the users password.

然后我在我的电脑上打开命令行并运行 NET USER username password/domain 它给了我一个 发生系统错误 5.访问被拒绝..

So then I opened up the command line on my pc and ran NET USER username password /domain it gave me a System error 5 has occured. Access is denied..

然后我继续以管理员身份登录的服务器运行 NET USER username password/domain 并且它起作用了.

So then I went on to the server logged in as an administrator ran NET USER username password /domain and it worked.

我如何告诉 cfexecute 在运行时以该管理员身份运行以使其正常运行?

How do I tell cfexecute to run as that administrator when it runs so that it works properly?

我查阅了 cfexecute 的文档,它不像 cfldap 那样您可以选择用户名和密码.

I looked up the docs of cfexecute and it is not like cfldap where you can choose a username and password.

对此的任何帮助将不胜感激!

Any help with this would be greatly appreciated!

编辑

还检查了管理员中的日志文件,并说明了这一点:

Also checked log files in admin and it stated this:

Error occurred: coldfusion.tagext.lang.ExecuteTag$TimeoutException: Timeout period expired without completion of c:windowssystem32cmd.exe

(它不能在 90 秒超时内运行那个简单的命令?但是当我在命令行中运行它时会立即运行?)使用 cfexecute 有什么问题吗?

(It cant run that simple command within a 90 second timeout? But runs instantly when I run it in the command line?) Is there something wrong with using cfexecute?

可以编辑吗?要添加用户,它总是像这样更改密码?:

EDIT IS IT POSSIBLE? To Add a user it always runs as to change the password like so?:

"/c net user /user:domainAdministrator <admin-pwd> username password /domain"

推荐答案

ColdFusion 只能访问 ColdFusion 服务使用的域和用户帐户.

ColdFusion is only able to access the domain and user account that is used by the ColdFusion service.

如果您想使用任何版本的 ColdFusion 针对本地系统或 Windows 域验证用户名/域,请考虑使用 CFX_EXEC 标记.

If you want to authenticate a username/domain against local system or Windows domain using any version of ColdFusion, consider using the CFX_EXEC tag.

http://adiabata.com/cfx_exec.cfm

<CFX_EXEC
    CMD="NET USER username password /domain"
    USER="Administrator"
    PWD="pass"
    DOMAIN="domain"
    FILE="C:UsersadministratorDesktop	est.txt">

这篇关于CFEXECUTE 分配它以管理员权限运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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