[Samba] smbclient gives strange results
Adam Nielsen
adam.nielsen at uq.edu.au
Sun Sep 13 19:51:55 MDT 2009
> I've been using Samba on a Sun server but we recently discontinued using the
> Sun and switched to using Samba on a RH linux server. I can't get file
> sharing to work on the new server. When I test the connection to the samba
> server (velar) by running smbclient //velar/homes -U eric I get an error
> message referring to NT_STATUS_BAD_NETWORK_NAME. I can't find any reason
> for this error because all the names are correct, permissions are correct,
> etc.
Are you running nmbd, the Samba nameserver? Without that it's possible
that it can't map "velar" into an IP address. You could also try it
with an IP instead of the name.
There's also no share //velar/homes, "homes" is special because it
changes to your username. Since you're connecting as eric (-U eric)
you'll need to connect to //velar/eric instead.
> Furthermore, when I run smbclient -L localhost -N it correctly lists the
> shares, but I get strange results, such as:
>
> Server Comment
> --------- ------------
> EARTH
> SATURN
> VELAR Samba
>
> Workgroup Master
> ------------- -----------
> PHON SATURN
>
> This is confusing because EARTH and SATURN are actually clients, not
> servers, so I don't see how they can be listed as servers. Also the master
> for PHON should be VELAR, not SATURN.
I suspect that any machine on the SMB network is classed as a server,
because it can share files. The workgroup master is automatically
selected and an 'election' takes place once Samba is up and running.
Samba will probably need to be running for a little while before it
becomes the master, so if you're trying this just after loading smbd one
of your other PCs will still be the master. Likewise when Samba shuts
down another election takes place to work out which of your existing PCs
should become the new master.
In this case all the master does (AFAIK) is maintain a list of PC names
and possibly IP addresses - it doesn't matter in the slightest whether
Samba is the master or not.
> os level = 255
> domain master = yes
> local master = yes
Try adding "preferred master = yes" to give Samba a better chance of
wining the election.
Cheers,
Adam.
More information about the samba
mailing list