相关疑难解决方法(0)

CFEXECUTE将其分配为以管理员权限运行

我正在尝试使用Active Directory更改密码cfexecute.我页面上唯一的代码是这个(填写用户名和新密码):

<cfexecute
name="c:\windows\system32\cmd.exe"
arguments="NET USER username password /domain"
outputfile="C:\Users\administrator\Desktop\test.txt"
timeout="90">
</cfexecute>
Run Code Online (Sandbox Code Playgroud)

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

然后我在我的电脑上打开命令行并运行NET USER username password /domain它给了我一个System error 5 has occured. Access is denied..

然后我继续以管理员运行的方式登录到服务器NET USER username password /domain并且它工作正常.

如何在运行时告诉cfexecute作为该管理员运行以使其正常工作?

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

任何有关这方面的帮助将不胜感激!

编辑

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

Error occurred: coldfusion.tagext.lang.ExecuteTag$TimeoutException: Timeout period expired without completion of c:\windows\system32\cmd.exe
Run Code Online (Sandbox Code Playgroud)

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

编辑是否可能? 要添加用户,它总是运行以更改密码,如此?:

"/c net user /user:domain\Administrator <admin-pwd> username password /domain"
Run Code Online (Sandbox Code Playgroud)

coldfusion cmd net-use cfexecute

9
推荐指数
1
解决办法
1295
查看次数

是否可以通过cfldap更改密码?

有一段时间我一直试图通过改变密码cfldap.连接通过SSL和端口636(cfssl_basic)进行,在登录时进行测试.我尝试了以下版本的代码:

<cfset password_new_retyp=charsetEncode(charsetDecode('"'&password_new_retyp&'"','UTF-16LE'),'UTF-8'))>
<!---encoded, decoded password --->
<cfldap action="modify"
    dn="#session.dn_addres#" --- i query this on login
    modifyType="replace"
    attributes="unicodePwd=#password_new_retyp#"
    server="xxxx.xxxx.xxx.xx" --- name of server thet i use on login
    secure = "cfssl_basic" 
    port=636
    username="#session.username#" ---username thet is used on login
    password="#password_old#">  ---- pass before changing
Run Code Online (Sandbox Code Playgroud)

和错误是这样的:

而试图执行查询时出现错误:[LDAP:错误代码49 - 80090308:LdapErr:DSID-0C0903C5,注释:AcceptSecurityContext错误,数据52E,v23f0.

我也尝试了这种方法,没有编码密码:

<cfldap action="modify"
    dn="#session.dn_addres#"
    modifyType="replace"
    attributes="password=#password_new_retyp#"
    server="xxxx.xxxx.xxx.xx"
    secure = "cfssl_basic"
    port=636
    username="#session.username#"
    password="#password_old#" >
Run Code Online (Sandbox Code Playgroud)

和恐怖是一样的:

而试图执行查询时出现错误:[LDAP:错误代码49 - 80090308:LdapErr:DSID-0C0903C5,注释:AcceptSecurityContext错误,数据52E,v23f0.一个或多个必需属性可能丢失或不正确,或者您无权在服务器上执行此操作.

任何的想法?

coldfusion ldap

6
推荐指数
1
解决办法
1251
查看次数

标签 统计

coldfusion ×2

cfexecute ×1

cmd ×1

ldap ×1

net-use ×1