On macOS Sequoia cannot get CommandBox with Lucee 6 to set admin password

Hi all,

I’m testing to install Lucee 6 using the latest CommandBox on macOS Sequoia using an Orka Desktop 3.0 VM.

I used brew to install the latest CommandBox and from CommandBox I imported by CFConfig.json file. However it doesn’t matter what I’ve tried, I cannot set the admin password for Lucee.

I tried for example the classic:

propertyFile set ~/.box.env cfconfig_adminPassword Password123!

install commandbox-cfconfig

install commandbox-dotenv

However that doesn’t work.

I also tried finding Lucee’s server root to setup the password.txt file but that did not work either. To try to find it I use the tree command (get it from brew) with the -afl options to view all paths on my whole machine, and placed the password.txt file everywhere I saw the context directory, and that did not work either.

Is this an issue of something not being compatible with Sequoia? or an issue with running it under an Orka VM (I doubt it)?

Also check out the attached screenshot which shows an error when trying to set the password, it says to report this as a bug (removed the actual password string from the screenshot for obvious reasons)

Are you on the latest version of CFConfig. Older versions only support Lucee 6 on the very initial import, but not on subsequent imports based on Lucee 6’s new JSON config file.

I installed CFconfig from brew, which I assume by default is the latest. And for good meassure I also installed it from within CommandBox. How can I tell which version I have running?

CFConfig isn’t on Brew, so I’m not sure what you mean. CommandBox is on brew, but it has thev version of CFConfig that was stable back when CommandBox 6.0.0 came out, which was months ago.

Depends on how you installed it. Did you use the --force flag? If not, you wouldn’t get the latest version since it’s a major version bump for Lucee 6 support.

list --system

When I did a “list --system” I got this

And after doing a --force on the cfconfig dotenv installation I got this

However I still cannot get the password to work so I can login into the Lucee administrator. This is very frustrating. Any ideas on how to get at the very least the directory where the password.txt file should go? I think the way Lucee requires users to set the password is a huge barrier to start using it, there should be an easier way (like for example showing the path where we should place the file, or asking for a first-time password during installation)

That looks good. You’re in the 2.x versions.

I’m not sure what to tell you. I just spun up a local Lucee 6 server to ensure it still works and I’m able to log in just fine. I keep a global env var called cfconfig_adminPassword which gets auto-imported to every server I start and I just logged into my Lucee 6 admin with the password set in the env var without issue. I’d need to know more about what specific settings you’ve got in what files and what commands you’re running in what order to try and guess that’s wrong.

Sure, it’s in the server home, but you shouldn’t need to mess with that file when CFConfig does its job. You can click on the tray icon and open the server home from there (tray icon needs enabled on Mac) or you can run

server info property=serverHomeDirectory

in the web root.

Yeah, it sort of is, but it’s for security.

That would be a security vuln for divulging information about where on the hard drive the server is installed to a potential attacker.

Lucee used to ask for a password the first time you hit the admin, but that was a huge security issue. The Lucee installer does ask you for a password, but CommandBox doesn’t use the Lucee installer.
Again, CFConfig should be handling this for you. I’m not sure why it’s not.

Assuming you’ve finally got the latest version of CFConfig, can you show again how you’re setting the password? A command? A JSON file? An env var? etc

Here’s a couple of strange things:

If I look into my ~/.box.env file I do see one line that says this:
cfconfig_adminPassword=myPassword

But I start CommandBox with the box command, and inside I type…
server info property=serverHomeDirectory

… I get this error message:
No server configuration found!

Anyw ideas as to why this is?

Also check what this says (trying to import my cfconfig file from my other machine):

The server info command needs to be run in the web root of the server. I’m guessing your sites folder is where you keep your projects, but not where you started the server. If you’re not sure what servers you’ve started and where, run server list to find them.
Furthermore, the to param to the CFConfig command should not point to the sites folder. It should point to the server home. But if it’s a CommandBox server, just give it the name of the server to=myserver OR just run the CFConfig command in the web root of the server and it will find it.

The issue is that I don’t have one web root. I’m using a multi-server approach where my ~/Sites directory works as a root for all of them according to my server.json file, which looks more or less like this:

{
    "app":{
        "cfengine":"lucee@5.3.9.166",
        "libDirs":"_java_libs"
    },
    "ModCFML":{
        "enable":"true",
        "requireSharedKey":"false"
    },
    "web":{
        "http":{
            "port":"80"
        },
        "SSL":{
            "enable":"true",
            "port":"443",
            "certFile":"/Users/elias/Sites/_ssl_certs/localhost.crt",
            "keyFile":"/Users/elias/Sites/_ssl_certs/localhost.key"
        },
        "hostAlias":[
            "site1",
            "site3",
            "site3"
        ],
        "rules":[
            "equals( %{LOCAL_SERVER_NAME}, 'site1' ) -> set(attribute=%{i,X-Tomcat-DocRoot},value='/Users/elias/Sites/site1')",
            "equals( %{LOCAL_SERVER_NAME}, 'site2' ) -> set(attribute=%{i,X-Tomcat-DocRoot},value='/Users/elias/Sites/site2')",
            "equals( %{LOCAL_SERVER_NAME}, 'site3' ) -> set(attribute=%{i,X-Tomcat-DocRoot},value='/Users/elias/Sites/site3')"
        ],
        "welcomeFiles":"index.cfm,index.htm,index.html"
    },
    "engine":"lucee",
    "openBrowserURL":"/index.cfm"
}

And btw, if I cd to my ~/Sites folder, and then start CommandBox with the box command, and then type “server list” I get thE message “No server configuration found with the incoming filters!”.

I also found out that when I start lucee by first going “cd ~/Sites” and then doing a “sudo box start” that among the messages that pop up is a path where it tries to find the password.txt file, however if I sudo cd to that folder it actually goes to different folder (I assume it’s a symbolic link) and if I create the password.txt file there it still does not find it (I stop and restart the server for good meassure). It’s as if macOS Sequoia hides the path somehow. Do note that all this is working perfectly fine on my other machine with macOS Ventura.

Hmm, to be honest, there’s so much information missing at this point, it’s nearly impossible to guess what’s going on without actually seeing your setup. Here are some thoughts/questions.

  • where exactly is your server.json
  • Are you ALWAYS running box with sudo or only part of the time? If you’re not being consistent, you’ll wind up with two CommandBox home directories-- one for your user and one for root and it will make things very confusing! It will change what servers the server list command sees. It will change where your global .env file is looked for. It will change what modules you have installed. It will change your config settings.
  • The ModCFML workaround you’re using is no longer supported in CommandBox 6 as noted in the docs. We now have proper multi-site support which is much more powerful.
  • "engine":"lucee", is not a valid setting and was saved at some point because you typed the wrong command to start your server.

among the messages that pop up is a path where it tries to find the password.txt file,

I don’t really follow what you’re describing. CommandBox has no such message. Do you have a screenshot? Is this coming from Lucee?

if I sudo cd to that folder it actually goes to different folder

I have absolutely no clue what you’re describing, lol. CommandBox doesn’t use symlinks for anything server related. I’d have to see actual screenshots or hard examples to even begin to understand what is going on.

Within the Orka Virtual desktop environment I could not get this to work. However outside of it (by upgrading from macOS 13 Ventura to macOS 15 Sequoia things worked fine. I think there’s an issue with CommandBox in virtual environments.