Samba auth settings for local shares not persisting after reboots

  • Seems entries in /run/samba/smbpasswd are not persisting after reboot.

    I'm getting somewhat lost with the auto-assembly of the final samba config in /run/samba from various other files scattered around the install.

    Between /storage/.config/samba.conf , /storage/.kodi/.smb/smb.conf , /storage/.cache/services/samba.conf (and any I've missed) where/what should I be doing so that the smbpasswd username/password entered via LibreELEC-Settings->Services is populated after next boot ?

    Cheers,

    --

    kurai

  • Go to Best Answer
  • Yes - the problem seems to be that at boot time the ExecStart=/usr/lib/samba/samba-config initiated from samba-config.service failes to create (or create in time ??) the /run/samba/smbpasswd that smbd is looking for during startsmbfilepwent_internal , so smbd recreates an empty smbpasswd file.

    Executing /usr/lib/samba/samba-config later in an SSH session *does* create a proper /run/samba/smbpasswd

    So, my question is ... how do I ensure that a populated smbpasswd file is created and|or created in time for smbd to find ?

  • The GitHub pull #7891 [samba: samba-config: call smbpasswd with valid smb.conf] in the latest (20230619-a2c7d54) nightly looks like it's done the trick.

    Thank you. :thumbup: