provision automatically chooses wrong IP address

Bug #975853 reported by Leo Richard Comerford
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
samba4 (Ubuntu)
Triaged
Low
Unassigned

Bug Description

I am running an almost-newly-installed Ubuntu Server 12.04 beta 2. Here's the output of ifconfig -a:

leo@blackbox:~$ ifconfig -a
eth0 Link encap:Ethernet HWaddr e0:cb:4e:ab:1e:dc
          inet addr:10.37.55.20 Bcast:10.37.55.255 Mask:255.255.255.0
          inet6 addr: fe80::e2cb:4eff:feab:1edc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:24831 errors:0 dropped:0 overruns:0 frame:0
          TX packets:13650 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:17977658 (17.9 MB) TX bytes:1580331 (1.5 MB)
          Interrupt:41

lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:541 errors:0 dropped:0 overruns:0 frame:0
          TX packets:541 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:65654 (65.6 KB) TX bytes:65654 (65.6 KB)

virbr0 Link encap:Ethernet HWaddr d6:24:11:56:bd:5c
          inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

During installation, the following manual IP settings - address 10.37.55.20, netmask 255.255.255.0, gateway 10.37.55.1, nameserver 10.37.55.20 - were given, and the package tasks "DNS server" and "Virtual Machine host" were selected (as well as "OpenSSH server"). It all seems to be working, though I haven't tested the virbr0 VM interface.

I have used <a href="https://bugs.launchpad.net/ubuntu/+source/samba4/+bug/832465/comments/7">Roger Hunwicks' workaround</a> to work around <a href="https://bugs.launchpad.net/ubuntu/+source/samba4/+bug/832465">bug 832465</a>, so samba4 now installs without aptitude reporting an error.

Whenever /usr/share/samba/setup/provision is run without using the option --host-ip , provision apparently chooses virbr0's IP address (192.168.122.1) and not that of eth0 (10.37.55.20):

leo@blackbox:~$ sudo /usr/share/samba/setup/provision --realm=irishtown.localonly.rvcomerford.ie --domain=IRISHTOWN --adminpass=[a password] --server-role=dc
Looking up IPv4 addresses
More than one IPv4 address found. Using 192.168.122.1
Looking up IPv6 addresses
No IPv6 address will be assigned
Setting up secrets.ldb
Setting up the registry
Setting up the privileges database
Setting up idmap db
Setting up SAM db
Setting up sam.ldb partitions and settings
Setting up sam.ldb rootDSE
Pre-loading the Samba 4 and AD schema
Adding DomainDN: DC=irishtown,DC=localonly,DC=rvcomerford,DC=ie
Adding configuration container
Setting up sam.ldb schema
Setting up sam.ldb configuration data
Setting up display specifiers
Adding users container
Modifying users container
Adding computers container
Modifying computers container
Setting up sam.ldb data
Setting up well known security principals
Setting up sam.ldb users and groups
Setting up self join
Adding DNS accounts
Creating CN=MicrosoftDNS,CN=System,DC=irishtown,DC=localonly,DC=rvcomerford,DC=ie
Creating DomainDnsZones and ForestDnsZones partitions
Populating DomainDnsZones and ForestDnsZones partitions
See /var/lib/samba/private/named.conf for an example configuration include file for BIND
and /var/lib/samba/private/named.txt for further documentation required for secure DNS updates
Setting up sam.ldb rootDSE marking as synchronized
Fixing provision GUIDs
A Kerberos configuration suitable for Samba 4 has been generated at /var/lib/samba/private/krb5.conf
A phpLDAPadmin configuration file suitable for administering the Samba 4 LDAP server has been created in /var/lib/samba/private/phpldapadmin-config.php .
Once the above files are installed, your Samba4 server will be ready to use
Server Role: domain controller
Hostname: blackbox
NetBIOS Domain: IRISHTOWN
DNS Domain: irishtown.localonly.rvcomerford.ie
DOMAIN SID: S-1-5-21-1208001617-3832972804-1616836880

This includes when provision is (apparently) run during package installation.

I assume this might leave samba wrongly configured to serve eth0 and the 10.37.55.0/24 subnet. But I'm not actually sure, partly because there's no actual mention of IP addresses in the generated /etc/samba/smb.conf , whether or not provision is called with --host-ip . When provision is given --host-ip=10.37.55.20 , the resulting /etc/samba/smb.conf is

# Global parameters
[global]
        server role = domain controller
        workgroup = IRISHTOWN
        realm = irishtown.localonly.rvcomerford.ie
        netbios name = BLACKBOX
        passdb backend = samba4

[netlogon]
        path = /var/lib/samba/sysvol/irishtown.localonly.rvcomerford.ie/scripts
        read only = No

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

, which seems identical to the result when --host-ip is not specified. The lines

Looking up IPv4 addresses
More than one IPv4 address found. Using 192.168.122.1

no longer appear in provision's standard output, though.

So it seems that either samba4 is being set up incorrectly, or provision - and so also samba4 package install - is misleadingly suggesting that samba4 is being set up incorrectly.

My version of samba4 is 4.0.0~alpha18.dfsg1-4 . However, I've also seen the same behaviour when trying to set up samba4 from the official alpha18 tarball on both 12.04 beta 2 and 11.10, and when trying to set up samba4 using 12.04 beta 2 and packages from the <a href="https://launchpad.net/~samba-team/+archive/daily">official Samba daily builds PPA</a> on 5 April 2012.

Jelmer Vernooij (jelmer)
Changed in samba4 (Ubuntu):
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.