[nzlug] samba: puzzled user...
Simon Bridge
simonbridge at ihug.co.nz
Sun Mar 9 18:13:47 NZDT 2008
On Thu, 2008-03-06 at 15:32 +1100, Daniel Pittman wrote:
> Simon Bridge <simonbridge at ihug.co.nz> writes:
>
> > I think it is the gui-fication that's got me turned around...
>
> I doubt it; your questions suggest that you don't quite have the basics
> locked in solidly.
Well, I'd normally make sure smbclient is running, and, knowing the
server IP, formally mount the dratted thing as CIFS... yes. However,
I've been looking at this naively - for a purpose.
Do we really expect a user to enter the CLI to access, say, workplace
provided shares? I see that there are gui-based tools... surely a user
expects to enter "network neighborhood" (or Places > Network) and just
see the available services? Perhaps Places > Connect to Server to
"activate" a service?
Do we really expect a user to "have the basics locked in solidly"?
>
> [...]
>
> > How can I get an ubuntu box to import a share without exporting one?
>
> Use the CIFS file system, fusesmb, or the user-space VFS support built
> in to your desktop environment. For the standard Ubuntu GNOME front end
> that would be under the Network menu, IIRC, just like on most other
> GNOME platforms.
Have found no explicit reference to fusesmb available to users... also
looked at xineitd and YaST control panel in openSUSE. Nada. SUSE insists
the service it calls smbfs handles "importing smb and cifs shares".
However - From the main menu I can get a dialog to join a network
server, which appears about right. However, it requires I know the
workgroup *and* the server name in advance.
This is curious as no such thing is needed when I just share a
directory.
Consider: In Ubuntu I can rt-click on the ~/Public folder and select
"Share this folder" - enter the desired workgroup, and that's it. I can
get a closer look with System > Administration > Shared Folders.
Once set up, the share seems to show up in XP's network neighborhood and
in Places > Network... but not all for all connected linux machines.
So - does this mean that, to "join a workgroup" a user is expected to go
to Places > Network Servers and enter the IP of every samba server on
the network?
OR - possibly: the user is expected to go to System > Administration >
Shared Folders and enter the workgroup in the general tab?
Which then leads to wondering what happens where a network has several
different workgroups, or a laptop moving between networks.
>
> > Is it possible to export a share "globally"? (All workgroups on the
> > lan can get it?)
>
> Your question doesn't really make sense: an SMB "share" is accessible to
> anything that asks the server to access it, modulo any user
> restrictions.
>
I'm not sure how to clarify... how does the client know what to ask for?
Well: presumably the user tells it. Like - "request all shares in
workgroup 'fubar'" or instructions to that effect.
(I'm putting it this way because I am imagining a network where every
machine is serving a local share.)
Presumably this is done automatically when the network service starts
(or some time defined by user/default settings).
The effect is - If I set up 5 computers to export the ~/Public folder,
then, in any of those five machines I can see five shares in places >
network. No further setup, provided all the shares have the same
workgroup. Nothing in fstab, no mount command, no launcher defined.
(But I could just be mistaken about how this happens - unfortunately,
the documentation I have seen is too general.)
So - what if I want to share a directory to every computer that comes
along... so when the server gets any request for a share in any
workgroup, a particular share gets sent irregardless of whether the
requested workgroup exists.
It seems, from the foregoing, that I cannot do that. I guess it is
possible for a sysadmin to include a particular directory in all the
workgroups the server knows about though. Possibly one could guess
common workgroup names like MSHOME and hope for the best.
> The only influence the "workgroup" or "domain" has on this is what the
> network browser on Windows lists by default.
>
> > Is it possible to scan a network for workgroups?
>
> Yes, though possibly not through the GUI.
I guess I need to do more reading...
http://smb4k.berlios.de/handbook/
>
> > These must be common questions...
>
> I wouldn't be surprised. Did you find the Ubuntu documentation, and the
> community documentation associated with the distribution helpful?
>
No.
> NFS is going to be a lot less trouble than CIFS if you expect it to act
> like a standard "Unix" file system, yes.
>From the point of view of a Linux-focussed course, it may be a good
exercize anyway, as it extends the filesystem concepts off the local
machine. However, joining a pre-existing windows network would seem a
useablility thing and tho howto should be included.
Fortunately, there are online howtos for this... I'm just trying to
understand the user interface.
Especially when an online howto expects something wot don't happen. Like
where they tell you to start the smbfs service but I get an error
message.
Perhaps it's just the setup I have that has confused me?
Anyway - have powered up all my machines to check more carefully...
There are four laptops, 3x Ubuntu 7.10 and 1x openSUSE 10.3. All are
samba servers, with one share ~/Public (ubuntu) and ~/public_html
(openSUSE). The fifth machine is a desktop Ubuntu 7.10 box wired to the
network, with two shares to the same domain: ~/Public and ~/music, no
authentication on any of these. There is no local DNS, and router uses
DHCP.
The laptops are hbclug00 through 03, desktop is indigo-prime.
Looking at smb://hbclug
indigo-prime
smb://hbclug contains
hbclug00 hbclug01 hbclug02 hbclug03
hbclug00
The screen lamp is down, so I set the wallpaper to white :)
All but indigo-prime are there.
hbclug01
smb://hbclug contains
hbclug00 hbclug01 hbclug02 hbclug03
hbclug02
smb:/// contains
nothing (reboot - all are visible except: indigo-prime)
hbclug03 (openSUSE)
smb:/// contains
nothing
(expected - smbfs service not active)
Curiously - though everyone can see the hbclug03 share, nobody can
display it. Error message: "Could not display all the contents".
It's also a puzzle that indigo-prime refuses to show today. I've been
using this share all week. (From hbclug02)
Probably indigo prime needs to restart samba server.
But my point is ... the user needed no knowledge of networking or
filesystems to acheive this.
If I alter one of the machines so that system > shared folders > general
has a different workgroup, reboot, then that machine no longer appears
in the others' smb:///
If I try the usual cli mount:
> student at hbclug01:~$ sudo mount -t cifs //192.168.1.101/home/student/Public /mnt
> mount: wrong fs type, bad option, bad superblock on //192.168.1.101/home/student/Public,
> missing codepage or helper program, or other error
> In some cases useful info is found in syslog - try
> dmesg | tail or so
>
> student at hbclug01:~$ dmesg | tail
> ...
> [ 1420.248000] eth1: no IPv6 routers present
> [12910.520000] CIFS VFS: cifs_mount failed w/return code = -22
> [12991.516000] CIFS VFS: cifs_mount failed w/return code = -22
posix error 22 is "invalid argument".
... so I have an incorrect command someplace.
cifs.mount(8) says that I am using it correctly. <sigh>
> $ sudo smbclient -L //192.168.1.101
> Password:
> Anonymous login successful
> Domain=[OTHER] OS=[Unix] Server=[Samba 3.0.26a]
>
> Sharename Type Comment
> --------- ---- -------
> print$ Disk Printer Drivers
> hbclug02-public Disk
> Documents Disk testing
> IPC$ IPC IPC Service (hbclug02 server (Samba, Ubuntu))
>
interesting... the domain=other up there is what I have listed as the workgroup.
So -perhaps I should be asking about joining a windows- domain? Perhaps
I'm confusing the role of workgroup with that of domain? hbclug02-public
is what I am trying to mount.
Perhaps you can now see how I can get so confused?
More information about the NZLUG
mailing list