stichl.at tech at work

17Dec/121

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...

/etc/network/interfaces:
 auto eth0
 iface eth0 inet static
 address 10.100.4.1
 netmask 255.255.0.0
 gateway 10.100.254.1
 dns-nameservers 10.100.254.1
 dns-search testdom.local

/etc/hostname:
 smbdc1.testdom.local

/etc/hosts:
127.0.0.1 localhost localhost.localdomain
10.100.4.1 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.