tech at work


Installing Samba 4 on Ubuntu 12.04 LTS

The installation of samba4 on Ubuntu 12.04 LTS is not really straight-forward.

After setting a nice network config...

 auto eth0
 iface eth0 inet static
 dns-search testdom.local


/etc/hosts: localhost localhost.localdomain smbdc1 smbdc1.testdom.local

The next step was to get samba4 directly from the repository:

apt-get install samba4

ProvisioningError: guess_names: 'realm =' was not specified in supplied /etc/samba/smb.conf. Please remove the smb.conf file and let provision generate it
nice one. next try:

rm /etc/samba/smb.conf
dpkg-reconfigure samba4

...same error :(

let's try the provisioning:

rm /etc/samba/smb.conf
/usr/share/samba/setup/provision --realm=testdom.local --domain=TESTDOM --adminpass='s3curePa$$w0rd' --server-role=dc
apt-get install samba4

new error:
ProvisioningError: guess_names: Workgroup 'TESTDOM' in smb.conf must match chosen domain 'WORKGROUP'! Please remove the /etc/samba/smb.conf file and let provision generate it

now set the default smbclient workgroup name using debconf:

echo "set samba-common/workgroup TESTDOM" | debconf-communicate
debconf-show samba-common
apt-get install samba4

The provisioning is now running for a second time but the deb-package is successfully installed.

Have fun :)

Filed under: Linux Leave comment
Comments (1) Trackbacks (0)
  1. I just make my day… I’m since yesterday night (without sleeping) trying to solve this samba-common issue.

    Many thanks bro

Leave a comment

No trackbacks yet.