This is the error:
Setting up samba (2:4.3.11+dfsg-0ubuntu0.16.04.8) ...
insserv: warning: script 'S99panasoniclpd-init' missing LSB tags and overrides
insserv: warning: script 'panasoniclpd-init' missing LSB tags and overrides
insserv: Starting panasoniclpd-init depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting panasoniclpd-init depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting panasoniclpd-init depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting panasoniclpd-init depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting panasoniclpd-init depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service panasoniclpd-init and plymouth if started
insserv: loop involving service plymouth at depth 8
insserv: loop involving service panasoniclpd-init at depth 1
insserv: Starting panasoniclpd-init depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package samba (--configure):
subprocess installed post-installation script returned error exit status 1
Where does this panasoniclpd-init script come from? Some proprietary printer package perhaps? It seems to be causing your problems. Can you try removing it?
To find out which package it is:
dpkg -S panasoniclpd-init
This is the error: 11+dfsg- 0ubuntu0. 16.04.8) ... d-init' missing LSB tags and overrides
Setting up samba (2:4.3.
insserv: warning: script 'S99panasoniclp
insserv: warning: script 'panasoniclpd-init' missing LSB tags and overrides
insserv: Starting panasoniclpd-init depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting panasoniclpd-init depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting panasoniclpd-init depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting panasoniclpd-init depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: Starting panasoniclpd-init depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: There is a loop between service panasoniclpd-init and plymouth if started
insserv: loop involving service plymouth at depth 8
insserv: loop involving service panasoniclpd-init at depth 1
insserv: Starting panasoniclpd-init depends on plymouth and therefore on system facility `$all' which can not be true!
insserv: exiting now without changing boot order!
update-rc.d: error: insserv rejected the script header
dpkg: error processing package samba (--configure):
subprocess installed post-installation script returned error exit status 1
Where does this panasoniclpd-init script come from? Some proprietary printer package perhaps? It seems to be causing your problems. Can you try removing it?
To find out which package it is:
dpkg -S panasoniclpd-init