wbell
I would love to work on this, however there is very little documentation regarding how user accounts are created.
I managed to find the following documentation, but it is minimal and doesn't explain much.
http://distro.ibiblio.org/smeserver/contribs/gordonr/devguide/html/x1954.htm
Well as suggested earlier, add a user in server manager and look at the resultant output in the messages log file. Quite a lot happens, much more than just the db command to add the actual user to the accounts database. You have to "translate" the way it is written in the log file, into actual commands, but it should be easy enough to figure out. You have the starting point in that doco.
Also search forums on creating users, and on user-create & so on, a good few posts have been made over the years on the same topic, and I see some old versions of scripts there too.
In essence though, all this should have been sorted out & forms part of the LAT script(s).
I see you made a find & fixed something in one of the scripts, so that is probably the best way to go, ie fix the broken part.