Comment 8 for bug 832465

Revision history for this message
Roger Hunwicks (roger-tonic-solutions) wrote : Re: package samba4 4.0.0~alpha17~git20110807.dfsg1-1ubuntu1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

One problem seems to be the samba4 postinst script is getting some values (realm, domain, netbios name, server role) from samba-common, and samba-common doesnt seem to use the values in smb.conf, particularly for domain.

My workaround is to
sudo apt-get install samba4-common-bin

then create replace the smb.conf file with a samba4 one, e.g. generated from a working samba4 installation, such as:
# Global parameters
[global]
 server role = domain controller
 workgroup = EXAMPLE
 realm = example.com
 netbios name = SERVER

[netlogon]
 path = /var/lib/samba/sysvol/example.com/scripts
 read only = No

[sysvol]
 path = /var/lib/samba/sysvol
 read only = No

Then run
sudo /var/lib/dpkg/info/samba-common.config

If you don't do the step above, then when samba4 installs, the postinst script attempts to provision the server, but debconf returns the domain as WORKGROUP instead of EXAMPLE and the provision fails - I don't know if this means the bug is in samba-common rather than samba4?

Then run
sudo apt-get install samba4
and it should all work correctly