SMB Config global hosts allow broken after migration from CORE to SCALE

In Truenas core, I use an auxiliary config option to set
hosts allow = 10.2.2. EXCEPT 10.2.2.1

In order to block any traffic coming from the router. This is now unfortunately a problem, because I’m using VPN on the router and want to reallow that IP to access SMB shares.

HOWEVER, in the meantime, I migrated to TrueNas Scale (latest version) and that option is no longer available to edit in the GUI. It is however still active (doing a testparm -s shows it to be there).

Editing /etc/smb4.conf makes no sense as that is recreated by the system on every startup of smbd, it seems.

How can I get that setting out of the config database?

Here’s the (not so obvious) solution:

  1. get to a command line

  2. #> cli
    You should now be in the truenas config environment

  3. #> service smb config
    you should now see the current global config for smb

  4. #> service smb update smb_options=“”
    this should reset the options to be empty

  5. #> exit

REBOOT (just restarting the SMB services was NOT enough)