TrueNAS disabled the “Additional Parameters String” field. Now this can only be set via the API. First you need to list shares to get the share ID:
midclt call sharing.smb.query|jq
Passing through jq will show well formatted json. You need the ID field:
[
{
"id": 2,
"purpose": "DEFAULT_SHARE",
...
Now run:
midclt call sharing.smb.update 2 '{"auxsmbconf": "force user = root"}'
and confirm the change:
midclt call sharing.smb.query |jq
or
midclt call sharing.smb.query '[["id", "=", 2]]' |jq
To restore that run:
midclt call sharing.smb.update 2 '{"auxsmbconf": ""}'