Netbios name %m not always correct
t.d.lee at durham.ac.uk
Fri Oct 17 17:13:54 GMT 2003
On Wed, 8 Oct 2003, M A Young wrote:
> On Sat, 4 Oct 2003, Richard Sharpe wrote:
> > On Fri, 3 Oct 2003, M A Young wrote:
> > > We have just moved a server over to Samba 3.0.0, and it seems that %m,
> > > which should return the netbios name often returns the ip number of the
> > > host instead. This is a problem, (apart from making the logging more
> > > confusing), since we use smbclient to provide responses to certain
> > > actions, and if %m isn't returning the correct netbios name I don't think
> > > the message gets through.
> > >
> > > Has anyone else seen this problem or know how to fix it?
> > Yes, this will be the case when the client uses a NetBIOS-less SMB
> > sessions (on port 445) which most clients do these days :-(
> > You will need to use some other macro. Perhaps %U or something like that.
> I am not sure that helps with message notifications, since I believe you
> need to know the netbios name before the host will accept the message.
Is the following correct?
1. Most PC-to-Samba connections these days use NetBIOS-less SMB (445), so
the PC's smbd session won't have a NetBIOS name available to all.
2. For a Samba host to use "SMBsend*" protocol elements back to that same
PC, it requires the NetBIOS name of the PC to open that connection.
If that is correct, then how might one bridge the gap from "1" to "2"?
(Michael is wanting, quite legitimately, to use "smbclient ... %m ..." as
part of an "smb.conf" "print command". And we have other things which
have used "smbclient ... %m ..." from "preexec".)
If that is incorrect, then could someone identify the flaw, please?
(If we're missing something apparently obvious, do tell us!)
: David Lee I.T. Service :
: Systems Programmer Computer Centre :
: University of Durham :
: http://www.dur.ac.uk/t.d.lee/ South Road :
: Durham :
: Phone: +44 191 334 2752 U.K. :
More information about the samba-technical