Setting Lucee Admin Password with CommandBox
One of the recent changes to Lucee is that no longer allows you to enter an admin password from the web based lucee admin if one had not been set yet. This is a great feature for security, but for local development it makes things a bit more cumbersome.
You'll see what I mean when you hit this error message:
No Password Set Yet!
For security reasons it is no longer possible to set the initial password here directly. You will need to configure a password before you can access the Server Administrator.
- create a file with the name password.txt containing your new password under the root Lucee Server Directory ( /lucee-server/context/password.txt )
- click "import file", Lucee will then read and configure your new password, afterwards Lucee will automatically delete that file.
Fixing it CommandBox Style with CFConfig
Assuming you already used commandbox to start the server, just make sure you are in the server's root directory and run these two commands from CommandBox:
install commandbox-cfconfig cfconfig set adminPassword=Password123!
If you already have
cfconfig installed, it doesn't hurt to run
install commandbox-cfconfig anyways - it will just make sure you have the latest version installed.
After you run those two commands, you can just reload the Lucee Admin page, and enter your new password. You might also want to choose a different password besides Password123! that's mine! Just kidding.
Like this? Follow me ↯Tweet Follow @pfreitag
Setting Lucee Admin Password with CommandBox was first published on September 02, 2020.
The FuseGuard Web Application Firewall for ColdFusion & CFML is a high performance, customizable engine that blocks various attacks against your ColdFusion applications.