[Samba] upgrade-ing samba on debian jessie. ( 4.1.17 to 4.2.3 sernet ) fails and solutions.

Rowland Penny rowlandpenny241155 at gmail.com
Wed Aug 19 15:33:20 UTC 2015


On 19/08/15 13:55, L.P.H. van Belle wrote:
> hai,
> ?
> Just an informational message and below the fixed for the problems..?
> ?
> when upgrading a member server with debian jessie with samba 4.1.17? with samba and winbind installed.?
> ?
> For me this was on?my print server.
> ?
> steps to take.
> ?
> setup the apt sources for sernet.
> ?
> install the sernet packages.
> apt-get install sernet-samba sernet-samba-winbind sernet-samba-common sernet-samba-libs
> ?
> which failes. ( half )
> upgraded the packages with the command :
> apt-get install sernet-samba sernet-samba-winbind sernet-samba-common sernet-samba-libs
> ....?
> ?
> The following packages were automatically installed and are no longer required:
> ? libaio1 libasn1-8-heimdal libgssapi3-heimdal libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libkdc2-heimdal libkrb5-26-heimdal libldb1 libntdb1
> ? libpython2.7 libroken18-heimdal libtalloc2 libtdb1 libtevent0 libwbclient0 libwind0-heimdal python-crypto python-dnspython samba-common samba-common-bin
> Use 'apt-get autoremove' to remove them.
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> 1 not fully installed or removed.
> After this operation, 0 B of additional disk space will be used.
> Setting up sernet-samba-winbind (99:4.2.3-7) ...
> insserv: script sernet-samba-winbindd: service winbind already provided!
> insserv: exiting now!
> update-rc.d: error: insserv rejected the script header
> dpkg: error processing package sernet-samba-winbind (--configure):
> ?subprocess installed post-installation script returned error exit status 1
> Errors were encountered while processing:
> ?sernet-samba-winbind
> E: Sub-process /usr/bin/dpkg returned an error code (1)
>
> ?
> I tried to start smbd.
> ?
> #/etc/init.d/sernet-samba-smbd start
> [....] Starting sernet-samba-smbd (via systemctl): sernet-samba-smbd.serviceJob for sernet-samba-smbd.service failed. See 'systemctl status sernet-samba-smbd.service' and 'journalctl -xn' for details.
> ?failed!
>
> # systemctl status sernet-samba-smbd.service
> ● sernet-samba-smbd.service - LSB: initscript for the SAMBA smbd
> ?? Loaded: loaded (/etc/init.d/sernet-samba-smbd)
> ?? Active: failed (Result: exit-code) since Wed 2015-08-19 12:30:53 CEST; 6s ago
> ? Process: 26089 ExecStart=/etc/init.d/sernet-samba-smbd start (code=exited, status=6)
> ?
> Aug 19 12:30:53 rtd-print1 sernet-samba-smbd[26089]: /etc/init.d/sernet-samba-smbd wants to start but SAMBA_START_MODE is set to "none".
> Aug 19 12:30:53 rtd-print1 sernet-samba-smbd[26089]: Disable /etc/init.d/sernet-samba-smbd or set SAMBA_START_MODE in
> Aug 19 12:30:53 rtd-print1 sernet-samba-smbd[26089]: /etc/default/sernet-samba to "classic".
> Aug 19 12:30:53 rtd-print1 sernet-samba-smbd[26089]: Exiting gracefully now. ... (warning).
> Aug 19 12:30:53 rtd-print1 systemd[1]: sernet-samba-smbd.service: control process exited, code=exited status=6
> Aug 19 12:30:53 rtd-print1 systemd[1]: Failed to start LSB: initscript for the SAMBA smbd.
> Aug 19 12:30:53 rtd-print1 systemd[1]: Unit sernet-samba-smbd.service entered failed state.
>
> the key lines :
> ?
> Aug 19 12:30:53 rtd-print1 sernet-samba-smbd[26089]: /etc/init.d/sernet-samba-smbd wants to start but SAMBA_START_MODE is set to "none".
> Aug 19 12:30:53 rtd-print1 sernet-samba-smbd[26089]: Disable /etc/init.d/sernet-samba-smbd or set SAMBA_START_MODE in
> Aug 19 12:30:53 rtd-print1 sernet-samba-smbd[26089]: /etc/default/sernet-samba to "classic".
> Aug 19 12:30:53 rtd-print1 sernet-samba-smbd[26089]: Exiting gracefully now. ... (warning).
>
> ?
> so fallback to default "classic" does not work by default,
> ?
> edit /etc/default/sernet-samba
> change SAMBA_START_MODE="none' ?to SAMBA_START_MODE="classic"
> ?
> and your able to start smbd and nmbd
> but.. also winbind starts now correctly.
> ?
> check if the installer?will do its work now.
> ?
> apt-get -f install
> ?
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> The following packages were automatically installed and are no longer required:
> ? libaio1 libasn1-8-heimdal libgssapi3-heimdal libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libkdc2-heimdal libkrb5-26-heimdal libldb1 libntdb1
> ? libpython2.7 libroken18-heimdal libtalloc2 libtdb1 libtevent0 libwbclient0 libwind0-heimdal python-crypto python-dnspython samba-common samba-common-bin
> Use 'apt-get autoremove' to remove them.
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
> 1 not fully installed or removed.
> After this operation, 0 B of additional disk space will be used.
> Setting up sernet-samba-winbind (99:4.2.3-7) ...
> insserv: script sernet-samba-winbindd: service winbind already provided!
> insserv: exiting now!
> update-rc.d: error: insserv rejected the script header
> dpkg: error processing package sernet-samba-winbind (--configure):
> ?subprocess installed post-installation script returned error exit status 1
> Errors were encountered while processing:
> ?sernet-samba-winbind
> E: Sub-process /usr/bin/dpkg returned an error code (1)
>
> Nope.. but again sernet-samba-winbind IS installed and works correctly.
> and debian winbind is removed.
> ?
> the dirty fix:
> ?
> cd /var/lib/dpkg
> cp status status.original
> edit status
> search for?? "Package: sernet-samba-winbind"
> change : "Status: install ok half-configured" to "Status: install ok installed"
> ?
> save
> ?
> check again
> apt-get -f install
> ?
> and..?
>
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> The following packages were automatically installed and are no longer required:
> ? libaio1 libasn1-8-heimdal libgssapi3-heimdal libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal libkdc2-heimdal libkrb5-26-heimdal libldb1 libntdb1
> ? libpython2.7 libroken18-heimdal libtalloc2 libtdb1 libtevent0 libwbclient0 libwind0-heimdal python-crypto python-dnspython samba-common samba-common-bin
> Use 'apt-get autoremove' to remove them.
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
>
> ?
> cleanup :
> ?
> apt-get autoremove
> ?
> Removing libaio1:amd64 (0.3.110-1) ...
> Removing samba-common-bin (99:4.2.3-7) ...
> Removing libkdc2-heimdal:amd64 (1.6~rc2+dfsg-9) ...
> Removing libgssapi3-heimdal:amd64 (1.6~rc2+dfsg-9) ...
> Removing libheimntlm0-heimdal:amd64 (1.6~rc2+dfsg-9) ...
> Removing libhdb9-heimdal:amd64 (1.6~rc2+dfsg-9) ...
> Removing libldb1:amd64 (2:1.1.17-2) ...
> Removing libntdb1:amd64 (1.0-5) ...
> Removing libpython2.7:amd64 (2.7.9-2) ...
> Removing libtevent0:amd64 (0.9.21-1) ...
> Removing libtalloc2:amd64 (2.1.1-2) ...
> Removing libtdb1:amd64 (1.3.1-1) ...
> Removing libwbclient0:amd64 (99:4.2.3-7) ...
> Removing python-crypto (2.6.1-5+b2) ...
> Removing python-dnspython (1.12.0-1) ...
> Removing samba-common (99:4.2.3-7) ...
> Removing libkrb5-26-heimdal:amd64 (1.6~rc2+dfsg-9) ...
> Removing libhx509-5-heimdal:amd64 (1.6~rc2+dfsg-9) ...
> Removing libhcrypto4-heimdal:amd64 (1.6~rc2+dfsg-9) ...
> Removing libheimbase1-heimdal:amd64 (1.6~rc2+dfsg-9) ...
> Removing libwind0-heimdal:amd64 (1.6~rc2+dfsg-9) ...
> Removing libasn1-8-heimdal:amd64 (1.6~rc2+dfsg-9) ...
> Removing libroken18-heimdal:amd64 (1.6~rc2+dfsg-9) ...
>
> my only question.?
> ?
> Removing samba-common-bin (99:4.2.3-7) ... ??
> Removing samba-common (99:4.2.3-7) ...?
> Removing libwbclient0:amd64 (99:4.2.3-7) ...
> ?
> why do we see here the version numers of sernet-samba, and not the debian samba version numbers.
> a check : dpkg -l | grep sernet
> show that the needed packages are installed.
> sernet-samba-common????????????? 99:4.2.3-7
> ?
> By checking my logs shows all service started correcly and all works.
> ?
> I?only noticed the winbind entry in my pam setup is gone.
> ?
> add it again:?? It would be nice if this goes in the sernet packages of winbind.. named : libpam-sernet-winbind ( or add it with the sernet-winbind packages )
> ?
> cat << EOF >> /usr/share/pam-configs/sernet-winbind
> Name: Sernet Winbind NT/Active Directory authentication
> Default: yes
> Priority: 192
> Auth-Type: Primary
> Conflicts: winbind
> Auth:
> ??????? [success=end default=ignore]??? pam_winbind.so krb5_auth krb5_ccache_type=FILE cached_login try_first_pass
> Auth-Initial:
> ??????? [success=end default=ignore]??? pam_winbind.so krb5_auth krb5_ccache_type=FILE cached_login
> Account-Type: Primary
> Account:
> ??????? [success=end new_authtok_reqd=done default=ignore]????? pam_winbind.so
> Password-Type: Primary
> Password:
> ??????? [success=end default=ignore]??? pam_winbind.so use_authtok try_first_pass
> Password-Initial:
> ??????? [success=end default=ignore]??? pam_winbind.so
> Session-Type: Additional
> Session:
> ??????? optional??????????????????????? pam_winbind.so
> ?
> EOF
> ?
> ?
> and handy to have mkhomedir
> ?
> cat << EOF >> /usr/share/pam-configs/mkhomedir
> Name: Create home directory during login
> Default: yes
> Priority: 900
> Session-Type: Additional
> Session:
> ??????? required??????? pam_mkhomedir.so umask=0022 skel=/etc/skel
> ?
> EOF
>
> now run :? pam-auth-update
> select sernet winbind (and optional mkhomedir ?and your done.
> ?
> reboot and test again.. and you see it all still works :-)
> ?
> ?
> Hope this helps someone.
> ?
> Greetz,
> ?
> Louis
> ?

Hi Louis, you are correct, you cannot upgrade from debian samba 4.1.17 
to Sernet samba 4.2.3 directly, you have to install the Sernet packages 
instead. It does error out as you have reported, but you can recover by 
purging winbind:

root at devuan:~# apt-get purge winbind
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer 
required:
   libaio1 libasn1-8-heimdal libgssapi3-heimdal libhcrypto4-heimdal 
libhdb9-heimdal
   libheimbase1-heimdal libheimntlm0-heimdal libhx509-5-heimdal 
libkdc2-heimdal
   libkrb5-26-heimdal libntdb1 libpython2.7 libroken18-heimdal 
libwind0-heimdal
   python-crypto python-dnspython
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
   winbind*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 70977 files and directories currently installed.)
Removing winbind (2:4.1.17+dfsg-2) ...
Purging configuration files for winbind (2:4.1.17+dfsg-2) ...
Setting up sernet-samba-winbind (99:4.2.3-7) ...

Run 'apt-get autoremove' and then start the three Sernet-samba binaries.

Rowland



More information about the samba mailing list