From owner-freebsd-questions@FreeBSD.ORG Sat Oct 30 12:30:43 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CBFC106564A for ; Sat, 30 Oct 2010 12:30:43 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mail.server1.bsdforen.de (bsdforen.de [82.193.243.81]) by mx1.freebsd.org (Postfix) with ESMTP id 2C5A18FC1B for ; Sat, 30 Oct 2010 12:30:42 +0000 (UTC) Received: from mobileKamikaze.norad (HSI-KBW-078-042-098-160.hsi3.kabel-badenwuerttemberg.de [78.42.98.160]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.server1.bsdforen.de (Postfix) with ESMTPSA id 86E077E92F for ; Sat, 30 Oct 2010 14:05:44 +0200 (CEST) Message-ID: <4CCC0A17.4040805@bsdforen.de> Date: Sat, 30 Oct 2010 14:05:43 +0200 From: Dominic Fandrey User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-GB; rv:1.9.1.15) Gecko/20101028 Thunderbird/3.0.10 MIME-Version: 1.0 To: freebsd-questions@freebsd.org X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: mount_smbfs hostname resolution X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Oct 2010 12:30:43 -0000 I'm trying to mount a share on the ADS of my university. I have, after many hours of tinkering, managed to find out why it doesn't work and even managed to access the share with smbclient. Though I now know (or at least suspect) the cause of the problem, I do not know how to apply the solution. I can reach the ADS server via the -I parameter, which circumvents the local address resolution. However the ads just returns the name of another server to connect to (output excerpts from smbclient -d3): ... got principal=hs-ad-01$@ADS.HS-KARLSRUHE.DE ... As you can see hs-ad-01 is a local name again. It cannot be resolved and the connection fails. However this can be circumvented by adding a search entry in /etc/resolv.conf: search hs-karlsruhe.de Et voilĂ : # ping hs-ad-01 PING hs-ad-01.hs-karlsruhe.de (193.196.64.10): 56 data bytes ... And suddenly the smbclient connection works: ... resolve_lmhosts: Attempting lmhosts lookup for name IZ-AD-28<0x20> resolve_wins: Attempting wins lookup for name IZ-AD-28<0x20> resolve_wins: WINS server resolution selected and no WINS servers listed. resolve_hosts: Attempting host lookup for name IZ-AD-28<0x20> Connecting to 193.196.65.128 at port 445 Connecting to 193.196.65.128 at port 139 ... Another side effect is that I don't have to use the -I parameter any more the smbclient command gets conveniently short: smbclient -U % //ADS/DFS smb: \> Unfortunately this mount_smbfs appears not to use hostname resolution, all that I get from it: # mount_smbfs //@ads/dfs /mnt/tmp mount_smbfs: can't get server address: syserr = Operation timed out Of course I can use the -I parameter: # mount_smbfs -Iads.hs-karlsruhe.de //@ads/dfs /mnt/tmp mount_smbfs: unable to open connection: syserr = Connection reset by peer My guess is that moung_smbfs receives the principal (hs-ad-01 is only one of many available candidates among which the load is balanced) and cannot resolve it or even doesn't handle redirection at all. Directly connecting to one of the providers also does not work: # mount_smbfs -Ihs-ad-01 //@ads/dfs /mnt/tmp mount_smbfs: unable to open connection: syserr = Connection reset by peer With this meagre output I don't really have a way of determining the true nature of the issue. All that I can say is that smbclient works and mount_smbfs does not. Unfortunately the net/samba34 does not install the smbmount utility of the samba suit. Regards -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?