I was not able to set the initial password. I tried setting the cfadmin password (New Server build), then coping the hash to a new server then restarting. This would not work. Because of this, I could not use use build automation or auto scaling (Elastic Beanstalk). I assume that eventually that someone would add a “set password” in the cli installl script or create a method to set the password hash. All the best…
Ended up doing a sed replace to set the password in the container.
run sed -i 's/<cfLuceeConfiguration.*>/<cfLuceeConfiguration hspw="xxxx" salt="xxxx" version="5.2">/g' /opt/lucee/server/lucee-server/context/lucee-server.xml
run sed -i 's/<cfLuceeConfiguration.*>/<cfLuceeConfiguration hspw="xxxx" salt="xxxx" version="5.2">/g' /opt/lucee/web/lucee-web.xml.cfm
Does any know the exact algorithm used to generate the password and salt. I would like to generate this with codebuild/“parameter store” and inject to the container during the build.
CFConfig is a service layer wrapped in a CLI tool, so you can pull the values from anywhere you like. The JSON files it imports can also expand environment variables in-place which matches the standard cloud deployments.
Hi Brad, I think setting adminPassword in commandbox 5.1.0+00186 does not work properly if cfconfigfile is listed in server.json (but other properties, e.g., datasources, do work).
If we set cfconfigfile in server.json, it doesn’t pick up adminPassword. However, if we set it in JSON cfconfigfile or via an environment variable , it seems to be picked up. Furthermore, manually setting in box via cfconfig set adminPassword=blah does not work. cfconfig show adminPassword says it doesnt exist.