mount_smbfs hostname resolution

Dominic Fandrey kamikaze at bsdforen.de
Sat Oct 30 12:30:43 UTC 2010


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 <user>%<pass> //ADS/DFS
smb: \>


Unfortunately this mount_smbfs appears not to use hostname
resolution, all that I get from it:
# mount_smbfs //<user>@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 //<user>@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 //<user>@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? 


More information about the freebsd-questions mailing list