Cfconfig does not seem to set the server password

Hi gang.
I am in the webroot of my app.
server.json is created and defines a lucee server with JRE of Java 11
I run box
I run server start
I run cfconfig set adminPassword=myPassword toFormat=luceeWeb
I run server restart

I CAN successfully login into web administrator

I run cfconfig set adminPassword=myPassword
I run server restart

I CANNOT successfully login into server administrator

I run cfconfig show adminPassword
I get Property [adminPassword] doesn't exist.

  • not sure if that is expected or not?

I am running the latest version of commandbox and also ran;
update --system --force
just to make sure…

Can anyone see what I am doing wrong?

I don’t know for certain, but I’d bet money you are specifically requesting that CFConfig set an admin password on the Lucee Web administrator and NOT the server administrator OR your .cfconfig.json.

  • If you want to set a value in the .cfconfig.json, use to=.cfconfig.json.
  • If you want to set a value in the lucee server admin, use to={server 'name' value from server.json} or to=server.json
  • Once the value is in your .cfconfig.json, you can set it in the lucee (server) administrator via cfconfig import .cfconfig.json

Finally, if you’re having trouble overriding the admin password, check for an environment variable override:

Yes, that’s expected. Since the admin passwords are hashed, you can’t view them in plain text. The adminPassword property only works when setting.

I would check for another place in your stack that is overriding the password, like an env var or JSON which is getting automatically applied on restart. (which was Michael’s suggestion) Start by doing a --verbose start and inspecting the output to see what things CFConfig is loading. It will tell you every file and env var it’s finding. This really should be your very first debugging step.