[nzlug] samba: puzzled user...
Robin Sheat
robin at kallisti.net.nz
Sun Mar 9 21:29:32 NZDT 2008
On Sunday 09 March 2008 19:53:37 Simon Bridge wrote:
> OK - so the workgroup talk is a red herring - - -
I think so, yes. This may change if you use Windows domain controllers. I
don't do that, all the networks I deal with are small, just a handful of
computers.
> So it strikes me that it may just be useful, for the setup I have, just
> to name the "workgroup" after the host and have done with it.
If you like, or just set them all to 'WORKGROUP' or 'MSHOME' or something. At
work, I have the Linux machines set to 'LINUX' (and I ignore the windows
machines, they're not my problem)
> > Because windows networking is a bit rubbish, and sometimes machines just
> > refuse to show up. Usually you can access them directly by typing the
> > name.
> Sayy what? Where?
Screenshot may be the best way to illustrate:
http://www.kallisti.net.nz/~robin/smbbrowser.png
Note the smb://dagobert bit in the address bar (this is just nautilus, you can
click the pen-and-paper button to let you enter names directly)
> OK - so here I was thinking in terms of consistent behaviour and the
> thing is renowned for not working consistently. Gotcha. No wonder I was
> driving myself up the wall.
I spent some time trying to figure that out on a windows network once. I
settled on 'reboot any machines having issues seeing or being seen'. Seemed
to work the best. Just the other day, none of the windows machine in my flat
could see my desktop unless you entered the name directly. A samba restart
fixed that (I suspect because samba was being the browse master, and
restarting it forced all the clients to refresh what they knew)
> Workgroup name is associated with the machine really - it's just that
> there can be many machines, on the same network, with the same workgroup
> name, where hostnames need to be unique?
Yep. I don't know what happens if you have multiple machines with the same
name. I suspect confusion.
> Right - so a new machine joins a network, it's samba client announces "I
> am here" and goes into a huddle with the servers... the servers
> basically say "Hi, I'm Bazz, I'm in workgroup fubar, have I got a folder
> for you: extra folds..." sort of thing?
Pretty much. To be pedantic, from what I know of these things, what happens is
they join the network and say:
"Hi, I'm looking for the browse master for the group fubar. Who are you?"
If they get a reply, they tell it:
"My name is bazz, and I'm going to join the workgroup"
If they don't, they tell everyone:
"I'm the browse master for the workgroup fubar"
Then, when another computer wants to see the computers on the network, it
says:
"Browse masters, tell me about yourselves"
and collates the responses, giving you a list of workgroups. When you want to
see a workgroup, it'll ask that browse master for the computers in it. When
you want to see a computer, it'll ask that computer for its shares.
When you ask for a computer, it'll broadcast "I'm looking for computer bazz,
talk to me". This process may be shortcut with things like DNS and (I think)
WINS.
This is a simplification, but should have the salient points. I read the samba
book a long time ago :) In particular, the browse master selection is more
complex than that.
> i.e. ALL shares on a machine should be "visible" to all clients on the
> network, except for the usual Windows Network snafu.
Yep.
> It is usual that at least one out of these five machines will not be
> visible without a restart. This time it was two.
Hmm. If there's a machine that's online all the time, or at least more than
the others, it'd probably pay to designate that as the browse master for a
workgroup, and put all the other ones in that workgroup.
http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/ref-guide/s1-samba-network-browsing.html
My guess at what is upsetting it is transient computers being browse masters,
and the other ones getting confused when it vanishes. In theory, the network
should recover from this quickly. In practice, it doesn't always.
> OK - but how long before I decide that it's not going to happen...
> 10mins?
It varies from minutes to days. Usually, if it's going to work at all, minutes
at most. But sometimes they'll fix themselves some time later.
> So why didn't the mount work? Why do all these people insist
> that the workgroups have to match - or is that only in the windows
> world?
I don't know. Windows may require explicit workgroup setting, but even in
explorer (the file manager), you can type \\machinename to browse it
directly. Played a few times with directly mounting (i.e. with fstab or
smbmount) smb shares, and never needed a workgroup name. Usually
smbmount //machine/share /mountpoint works just fine. Similar for fstab
(although, if it's between reasonably permenant Linux/UNIX machines, use NFS,
I found it to be much faster and more reliable. Been planning to look into
coda for laptops).
> That sounds promising. Possibly port to windows too... maybe a way
> windows users can get around network restrictions in some editions of
> the license?
I dunno. I don't know much about windows limitations, except that I often find
them quite irritating (why can't I rdesktop into a machine, and have someone
sitting at it at the same time?). I'm not a fan of crippleware, and it only
gets worse when it's the kind of crippling that requires extra code to
enforce :) I've been getting bug reports on some of my software that I ported
to that forsaken platform because it can't handle path names over 255
characters. That's not filenames, that's the full path. Imagine someone has
their files somewhere under 'Documents and Settings', that's 23 of those
characters gone already. And we're dealing with music tracks with long names
here. Took me ages to pin down because I couldn't reproduce it. And don't get
me started on allowed characters. I ended up stripping anything that looked
shady, and have to do that on all platforms because people use MP3 players
with vfat filesystems. </rant>
I also don't know what work is needed to make windows support another network
filesystem type, but I'm sure it's possible. I think I've seen it done for
NFS.
--
Robin <robin at kallisti.net.nz> JabberID: <eythian at jabber.kallisti.net.nz>
Hostes alienigeni me abduxerunt. Qui annus est?
PGP Key 0xA99CEB6D = 5957 6D23 8B16 EFAB FEF8 7175 14D3 6485 A99C EB6D
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://www.linux.net.nz/pipermail/nzlug/attachments/20080309/3f6fcae3/attachment.pgp
More information about the NZLUG
mailing list