Help accessing SMB after Scale migration

After migrating to 24.04, I can’t log into any of my SMB shares. Attempting to make changes to users and permissions or creat a new user account (to move away from root) gives me a warning “SMB users may not be configured while SMB service backend is unitialized.”

Can someone please translate what that warning means?

Update: I also tried turning off SMB Service, but I get an error when trying to turn it back on"

failed with error: Unknown parameter encountered: "directory name cache size "
Error setting parameter directory name cache size to 0: SBC_ERR_INVALID_PARAM

and earlier in the log:

"directory name cache size ": {“parsed”: “0”, “raw”: “0”},

That means you have one or more invalid auxiliary parameters. Remove / comment them all out.

I’m only aware of one auxiliary parameter that was set: strict sync = no. And nothing that has to to with the error about ‘directory name cache size’.

I’ve attempted to remove it with:

midclt call sharing.smb.query | jq
midclt call sharing.smb.update 3 '{"auxsmbconf": ""}'

Does that code look right? I’m struggling to find a way to alter auxiliary parameters since the were removed from the GUI in Scale.

Check your SMB options as well midclt call smb.config

This means that you literally have added a parameter to your SMB configuration that does not exist: directory name cache size. IIRC this parameter was removed in more recent samba versions.

I only have about 3 SMB shares and 2 NFS shares. The NFS shares aren’t connecting either.

Technically, I’m the only user. Maybe it’s cleaner to delete all these shares and created new ones using Scale to avoid any issues?

What is output of midclt call smb.config | jq and midclt call sharing.smb.query | jq?

Output of midclt call smb.config | jq

{
  "id": 1,
  "netbiosname": "freenas",
  "netbiosalias": [],
  "workgroup": "WORKGROUP",
  "description": "FreeNAS Server",
  "unixcharset": "UTF-8",
  "loglevel": "MINIMUM",
  "syslog": false,
  "aapl_extensions": true,
  "localmaster": true,
  "guest": "nobody",
  "filemask": "",
  "dirmask": "",
  "smb_options": "getwd cache = yes\nsocket options = TCP_NODELAY IPTOS_LOWDELAY\nread raw = yes\nwrite raw = yes\naio write size = 16384\naio read size = 16384\nmin receivefile size = 16384 \nuse sendfile = yes\nidmap cache time = 604\ndirectory name cache size = 0",
  "bindip": [],
  "cifs_SID": "S-1-5-21-4108125044-3368457986-378359523",
  "ntlmv1_auth": false,
  "enable_smb1": false,
  "admin_group": null,
  "next_rid": 1001,
  "multichannel": false,
  "netbiosname_local": "freenas"
}

Output of midclt call sharing.smb.query | jq

  {
    "id": 1,
    "purpose": "ENHANCED_TIMEMACHINE",
    "path": "/mnt/TOOLSHED_STORAGE/TimeMachine",
    "path_suffix": "%U",
    "home": false,
    "name": "TimeMachine",
    "comment": "",
    "ro": false,
    "browsable": true,
    "recyclebin": false,
    "guestok": false,
    "hostsallow": [],
    "hostsdeny": [],
    "auxsmbconf": "",
    "aapl_name_mangling": false,
    "abe": false,
    "acl": true,
    "durablehandle": true,
    "streams": true,
    "timemachine": true,
    "timemachine_quota": 0,
    "vuid": "0da014b0-f297-446c-89e3-85d6b0c63092",
    "shadowcopy": true,
    "fsrvp": false,
    "enabled": false,
    "afp": false,
    "audit": {
      "enable": false,
      "watch_list": [],
      "ignore_list": []
    },
    "path_local": "/mnt/TOOLSHED_STORAGE/TimeMachine",
    "locked": false
  },
  {
    "id": 3,
    "purpose": "NO_PRESET",
    "path": "/mnt/SSD_RAID/WORKING",
    "path_suffix": "",
    "home": false,
    "name": "WORKING",
    "comment": "",
    "ro": false,
    "browsable": true,
    "recyclebin": false,
    "guestok": false,
    "hostsallow": [],
    "hostsdeny": [],
    "auxsmbconf": "",
    "aapl_name_mangling": true,
    "abe": false,
    "acl": true,
    "durablehandle": true,
    "streams": true,
    "timemachine": false,
    "timemachine_quota": 0,
    "vuid": "",
    "shadowcopy": true,
    "fsrvp": false,
    "enabled": false,
    "afp": false,
    "audit": {
      "enable": false,
      "watch_list": [],
      "ignore_list": []
    },
    "path_local": "/mnt/SSD_RAID/WORKING",
    "locked": false
  },
  {
    "id": 4,
    "purpose": "DEFAULT_SHARE",
    "path": "/mnt/SERVER_SSD/Sound_Rolls",
    "path_suffix": "",
    "home": false,
    "name": "Sound_Rolls",
    "comment": "",
    "ro": false,
    "browsable": true,
    "recyclebin": false,
    "guestok": false,
    "hostsallow": [],
    "hostsdeny": [],
    "auxsmbconf": "",
    "aapl_name_mangling": false,
    "abe": false,
    "acl": true,
    "durablehandle": true,
    "streams": true,
    "timemachine": false,
    "timemachine_quota": 0,
    "vuid": "",
    "shadowcopy": true,
    "fsrvp": false,
    "enabled": false,
    "afp": false,
    "audit": {
      "enable": false,
      "watch_list": [],
      "ignore_list": []
    },
    "path_local": "/mnt/SERVER_SSD/Sound_Rolls",
    "locked": false
  }

These are the things you need to disable. It’s mostly legacy tuning voodoo honestly. midclt call smb.update '{"smb_options": ""}'

That worked! The SMB shares are accessible again. Thanks for your help!

First large file transfer tests over SMB were considerably slower than it used to be. I’ll have to do see research to see if there are new options that would help.

Thanks again!