[Bug 507374] [NEW] dhcp.conf file created with invalid syntax
Adam Bolte
boltronics at gmail.com
Thu Jan 14 08:56:19 GMT 2010
Public bug reported:
Binary package hint: samba
I'm using Ubuntu 9.10 with dhcp3-client 3.1.2-1ubuntu7. We have a WINS
server at 10.128.41.34, 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 at abolte-amd64:~$ cat /etc/samba/dhcp.conf
wins server == br0:10.128.41.34
abolte at abolte-amd64:~$
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 at abolte-amd64:~$ testparm -s 2>&1 | grep wins
wins server = =, br0:10.128.41.34
abolte at abolte-amd64:~$
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 at abolte-amd64:/etc/samba$ cat dhcp.conf
wins server = br0:10.128.41.34
abolte at abolte-amd64:/etc/samba$
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:
other_servers==""
serverlist==""
which I believe end up assigning "=" instead of nothing.
** Affects: samba (Ubuntu)
Importance: Undecided
Status: New
** Tags: dhcp.conf samba-common
--
dhcp.conf file created with invalid syntax
https://bugs.launchpad.net/bugs/507374
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to samba in ubuntu.
More information about the Ubuntu-server-bugs
mailing list