———

 
Translations of this page:

TrueNAS Add share option "force user"

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": ""}'
 
homelab/truenas-force-user/truenas-add-share-option-force-user.txt · Last modified: 12.16.2024 17:32 by npelov
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki