dhcp.conf file created with invalid syntax

Bug #507374 reported by Adam Bolte on 2010-01-14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
samba (Debian)
Fix Released
samba (Ubuntu)
Thierry Carrez

Bug Description

Binary package hint: samba

I'm using Ubuntu 9.10 with dhcp3-client 3.1.2-1ubuntu7. We have a WINS server at, which clients are informed of via DHCP. The produced dhcp.conf file (generated by dhclient using /etc/dhcp3/dhclient-enter-hooks.d/samba) seems invalid, as it produces a file using a double equals symbol to assign the WINS servers. This has been observed from a number of Ubuntu machines.

abolte@abolte-amd64:~$ cat /etc/samba/dhcp.conf
   wins server == br0:

Interestingly enough, the testparm command doesn't complain about it. The output does look wrong however. This could be another bug in itself I suppose, but is not the topic of this report.

abolte@abolte-amd64:~$ testparm -s 2>&1 | grep wins
 wins server = =, br0:

I've attached a patch which seems to fix the issue for me. Steps to use this would be (where "br0" is the interface in this case):
1. If needed, release the current lease
$ dhclient -r br0
2. Delete the dhcp.conf file
$ rm -f /etc/samba/dhcp.conf
3. Replace /etc/dhcp3/dhclient-enter-hooks.d/samba with the patched version.
4. Grab a lease
$ dhclient br0

The dhcp.conf file will now be re-created correctly as follows:

abolte@abolte-amd64:/etc/samba$ cat dhcp.conf
   wins server = br0:

The patch was created against the latest (at time of reporting) samba-common_3.4.3-2ubuntu1_all package, however testing was against 3.4.0-3ubuntu5.3. The file in question has not changed between these releases.

The patch should also detect an invalid config and correct it if it exists - but only if we're making changes anyway. Perhaps this check should go in regardless of the WINS setup not changing from previous leases? There was a small change thrown in to fix up the dhcp.conf formatting too.

The problematic lines specifically seems to be:
which I believe end up assigning "=" instead of nothing.

Chuck Short (zulcss) wrote :

Thanks for the bug report ill look at getting this fixed for lucid.


Changed in samba (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Changed in samba (Ubuntu):
status: Confirmed → Triaged
Thierry Carrez (ttx) on 2010-03-10
tags: added: bugzapping-target
Thierry Carrez (ttx) on 2010-03-11
Changed in samba (Ubuntu):
assignee: nobody → Thierry Carrez (ttx)
status: Triaged → In Progress
Thierry Carrez (ttx) wrote :

Fixed by way of merging Debian's 3.4.5~dfsg-2

Changed in samba (Ubuntu):
status: In Progress → Fix Released
Changed in samba (Debian):
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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