Retrieving and Resetting ColdFusion Administrator Passwords
19
Feb
Posted by: Brandon Harper in: ColdFusion, Culture, FreeBSD, Languages, Linux, OS X, Operating Systems, Tips, Hacks, & Tricks, Windows
Seems like this question comes-up quite a bit, and I can never seem to find the snippet of code which will do this in CF 5, so I thought I'd leave myself a post of this snippet of code, and perhaps someone else out there in the future trying to find information on how to reset their administrator password. That said, here are a few ways to get back into the CF Administrator if you've somehow been inadvertently locked-out for both ColdFusion 5 and previous versions, as well as ColdFusion MX:
For ColdFusion 5 on Windows:
Find the following registry entry:
CODE:
-
HKLM\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Server\UseAdminPassword
And set it to 0. Restart the ColdFusion Server service, and go to the Administrator to set a new password.
OR:
Use this code snippet to retrieve the password values:
CODE:
-
<cfset password_key="4p0L@r1$">
-
<cfregistry action="GET" branch="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Server" entry="AdminPassword" variable="adminpassword" type="String">
-
</cfregistry><cfregistry action="GET" branch="HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Server" entry="StudioPassword" variable="studiopassword" type="String">
-
<cfoutput>
-
<strong>Admin Password:</strong><br />
-
#Evaluate("cfusion_Decrypt(adminpassword, PASSWORD_KEY)")# <br /><br />
-
<strong>RDS Password:</strong> <br />
-
#Evaluate("cfusion_Decrypt(studiopassword, PASSWORD_KEY)")# <br /><br />
-
</cfoutput>
-
</cfregistry>
For ColdFusion 6 MX, ColdFusion 7 MX, and ColdFusion 8:
- Stop the "ColdFusion MX Application Server" Service
- Open the "neo-security.xml" file contained at %CFMXInstallRoot%\lib
- Find the line: "<var name='admin.security.enabled'><boolean value='true'/></var>" and change the true to false, then save the file
- Restart the "ColdFusion MX Application Server" Service
- Go to the ColdFusion Administrator again and set a password
6 Responses
Blog-Fu
18|Jun|2004 1Forgetting an Admin password is generally bad.
Okay. I had apparantly forgot the Admin password for my localhost ColdFusion Server. That's a bad thing. Luckily I found how to resetting ColdFusion Administrator Passwords. Whew....
CLM
23|Feb|2007 2THANK YOU Brandon!!
CLM
Lance
17|Jul|2007 3Thanks, but you should change your title to say WINDOWS as all you wrote was that, and it appeared on a search with linux in the title.... so thanks!
Sean Harrison
17|Sep|2007 4Hey man - that final /CFRegistry tag should be on line 4.
Amaacnt
20|Jan|2008 5Thanks a lot.
Wesley Hall
31|Jul|2008 6Thanks alot! I read a different set of instruction that left out restarting the CF service. This did the trick.
Leave a reply
Search
Categories
Archives
Links
Calendar
A design creation of Design Disease
devnulled is a personal blog and reflects the ideas and opinions of brandon harper and not his employer, dog, shoes, or stapler.
All content copyright © 2002-9002 brandon harper. All rights reserved.
devnulled is powered by FreeBSD, WordPress and the combustion of dead dinosaurs. It has also been made magically delicious by the pfm module.