CFEXECUTE assigning it to run with administrator rights - cmd

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:\windows\system32\cmd.exe"
arguments="NET USER username password /domain"
outputfile="C:\Users\administrator\Desktop\test.txt"
timeout="90">
</cfexecute>
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.
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..
So then I went on to the server logged in as an administrator ran NET USER username password /domain and it worked.
How do I tell cfexecute to run as that administrator when it runs so that it works properly?
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!
Edit
Also checked log files in admin and it stated this:
Error occurred: coldfusion.tagext.lang.ExecuteTag$TimeoutException: Timeout period expired without completion of c:\windows\system32\cmd.exe
(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:domain\Administrator <admin-pwd> username password /domain"

ColdFusion is only able to access the domain and user account that is used by the ColdFusion service.
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:\Users\administrator\Desktop\test.txt">

Related

Can't launch Wakanda server. Force prompt an admin access

I have a solution where I had a user1. I have add this user in the Admin group to give him access to the server. Then I change the name in admin and set the password to admin1234. Then ehn I start the server and it ask for the pass, I enter the new one but it doesn't work. So I remove my user and create a new one, still the same... I remove all the user and have only the default Admin group with no user, but still impossible to run anything. I always get ask for the admin pass when I have no user in the directory.
I have try to do a custom required.js function, I have try with the basic settings... I tried everything but I can't make my project to run.
Anybody have an idea of what should I do to fix this problem?
Try to remove the admin user, kill the server process and then create a new admin user.
I had the same issue a long time ago and this worked for me.

Active Directory how to simulate a user login in and changin his password

Short story :
Knowing the temporary password of a user, how to simulate a user login and change it's password without actually open a session when the option user must change password at next logon is enabled ?
Long story:
I'm in a helpdesk and have access to an app that allow me to generate a new password for a AD user account. When the password is generated, the option user must change password is also activated. Sometimes the user is outside the office so he ask me to change the password for him. I'm able to switch user on my workstation, open a session with the user's temp password then change the pass.
What I'd like is to make this password change from my own session.
What I have tried
Run as: runas /user:domain cmd.exe
-> error 1907 The user's password must be changed before logging on the first time.
net user net user username newpassword /dom
-> error 5 access denied
start-process start-process -credential domain\username powershell.exe
-> invalidOperationException The user's password must be changed before logging on the first time.
Actually this is really easy with the active directory module :
Set-ADAccountPassword username
will ask for the old and new password. That's all

Unable to reset WAS admin password. unable to login WAS console

I am unable to login inot WAS Admin console. So I am trying to reset the admin credential after disabling security(security.xml-enabled="false"), but unable to save the new password. Any idea what should I check and troubleshoot?
I tried entering the credentials on soap.clients.props, but no help. WAS version : 7.0
From
http://www-01.ibm.com/support/knowledgecenter/SS7JFU_7.0.0/com.ibm.websphere.messages.doc/com.ibm.ejs.resources.security.html?cp=SS7JFU_7.0.0%2F1-15-7-225
SECJ7342E: Failed to validate user/password
Explanation Failed to validate user password in WIM registry
Action None
The credentials that you entered do they exist in the WIM registry?
From the screen shot it appears that you are using the File Based registry. Check that the ID and passwords match the values in that File Registry.
If you disabled security, then restart your server, so it starts plain, unsecured and enable security again via console. There will be prompt to specify admin user and password (I'm assuming you are using default Federated repository with file based). Provide new password there and restart the server.
In the page you are showing now, leave Server user identity as default - Automatically generated. This is not page, where you change user password.
Settings in soap.clients.props are not related to password changing. Once you set new password via console, you can update that file, so you won't be prompted, when you stop server from the command line.
This technote is also helpful when forgetting your WAS Admin console password:
Forgot password and cannot access WebSphere Application Server administrative console
https://www.ibm.com/support/docview.wss?uid=swg21405302

CMD - Finding the password of admin account using another admin account in windows 7

I have two admin accounts, one of which i forgot the password. I have another admin account but i don't want to reset the password but reveal or see the old password using CMD. I have been searching for this since a long time but had no luck with it! Hoping I would get the answer this time :)
I know to reset password using CMD prompt: net user < user > < password >
But my old emails have the same password as this account. So i want to Retreive my old password rather than reseting it!

Supply Username and Password to witadmin

Using witadmin I'm trying to delete a work item on a TFS in a different domain. I therefore use a login that is different from my Windows login, for which I'm asked when opening the web interface.
However, witadmin fails with the following message, not prompting for username and password:
Unable to destroy work item(s) 1. TF237090: Does not exist or access
is denied.
Is there a way to supply credentials as arguments or explicitly make witadmin prompt for credentials?
What solved my problem is the Credential Manager, which is in Control Panel > User Accounts > Manage Your Credentials. I added an item to Windows Credentials containing containing the username and password I need for the TFS.
It doesn't make witadmin ask, but it takes these credentials.

Resources