[Pkg-samba-maint] Bug#462803: mount.cifs not respecting name resolve order

Steve Langasek vorlon at debian.org
Tue Jan 29 23:06:56 UTC 2008


On Sun, Jan 27, 2008 at 02:20:12PM -0500, Michael Marsh wrote:
> On Jan 27, 2008 2:10 PM, Steve Langasek <vorlon at debian.org> wrote:
> > mount.cifs doesn't honor smb.conf, yes.  It only resolves hostnames using
> > gethostbyname(), and only supports overriding this resolution using an ip=
> > mount option.  Presumably this worked for you before only because you were
> > using mount.smbfs rather than mount.cifs.

> I've been using mount.smbfs, which apparently was recently forcibly
> switched to mount.cifs, regardless of how it's specified in
> /etc/fstab.

Right.

> > As for all hostnames being resolved incorrectly by Verizon's DNS servers,
> > that's not our problem to fix.  They're the ILEC where I live and I refuse
> > to do any business with them because of their incompetence and their
> > reprehensible political lobbying; if you choose to deal with an Internet
> > provider who spits on Internet standards, you'll have to find your own way
> > to overcome the resulting problems.

> I can certainly appreciate that this is an error on Verizon's end
> (which they have no intentions of correcting), but why force a switch
> on users when the new version doesn't respect what the old version
> did?

You're not forced to use cifs; you can always build the smbfs utilities from
source if you feel you need them.  But Debian is not going to support smbfs
for lenny, because smbfs has been deprecated for years, has longstanding
bugs that will never be fixed, and is actively undergoing bitrot.

> mount.smbfs worked fine, and I could prevent it from talking to
> the wider network.  As it is, I now have to hard-code an IP address
> that isn't stable (because of DHCP), when SMB has a perfectly good
> naming scheme.

Two possible workarounds for using netbios name resolution with mount.cifs:

- install the winbind package, and enable "wins" for hosts in
  /etc/nsswitch.conf (due to your ISP's broken DNS servers, I suppose you'd
  need to list wins before dns in the list, which is rather unfortunate...)
- mount your filesystems using the syntax:
     mount -t cifs -o<options>,ip=$(nmblookup $myhost | awk '/<00>/ { print $1 }/') \
	//$myhost/$share $mountpoint

  I don't know if this syntax would work in /etc/fstab, but I suspect it
  doesn't.

Ultimately I would like mount.cifs to be able to use /etc/samba/smb.conf's
name resolve order, but that's not likely to happen in the short term.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                    http://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org





More information about the Pkg-samba-maint mailing list