[Samba] Re: can smbmount access paths in shares?

2005-10-28 Thread Magnus Holmgren
Bill Kearney skrev:
 Can a linux machine running samba mount a pathname within a share into a
 local path?  I'm runing samba-3.0.20b-1 on a centos 4.1 (rhel4) box.
 
 I've tried this and it fails:
 
 smbmount //servername/home/media /mnt/media/server/ -o
 username=myuser,password=mypass
 
 The error is:
 8465: tree connect failed: ERRDOS - ERRnosuchshare (You specified an invalid
 share name)
 
 When I omit the last portion of the service path it works just fine:
 smbmount //servername/home /mnt/media/server/ -o
 username=myuser,password=mypass
 
 Trouble is, I don't want to mout the 'root' of the share, I want to mount a
 subdirectory within it.
 
 On a w2k box this syntax works fine:  'net use m: \\server\home\media' and
 it properly mounts the path as the m: drive.  I do recall that win9x boxes
 could not mount subdirectories of shares.  Is samba likewise crippled?
 
 So what gives here?  Can smbmount not mount from a pathname within a
 service?  Or am I missing the n necessary magical command line incantation?

Late reply, but anyway:

What you *can* is the following:

smbmount //servername/home /tmp/foo -o username=myuser,password=mypass
mount --bind /tmp/foo/media /mnt/media/server
umount /tmp/foo

Or at least it works for me, at least with CIFS mounts.

-- 
Magnus Holmgren
[EMAIL PROTECTED]

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba


Re: [Samba] Re: can smbmount access paths in shares?

2005-10-28 Thread Michael Barnes
Let me see if I understand this right.  You have a Windows box with a 
share of (for example) D:\home\media.  You have gone to the D:\home 
folder and selected full sharing.  However, from your Linux box, you 
don't want to mount D:\home, you want to mount D:\home\media and not 
have the contents of D:\home visible.  You can only use smbmount to 
mount folders that are listed as a share.  Subfolders do not inherit the 
sharability (?) of the parent.  Hence, you must set each folder you want 
to mount as a share unto itself.  You do not have to set anything above 
that folder as a share.  So, if you go into the properties of 
D:\home\media and set the media folder to full share, you may then use 
smbmount //servername/media /mnt/media/server/ to mount the media folder.


At least if I understand things right, this is how it works, at least it 
has for me.  If I am wrong, I'm sure someone will correct me.


Michael


Magnus Holmgren told me on 10/28/2005 09:52:

Bill Kearney skrev:


Can a linux machine running samba mount a pathname within a share into a
local path?  I'm runing samba-3.0.20b-1 on a centos 4.1 (rhel4) box.

I've tried this and it fails:

smbmount //servername/home/media /mnt/media/server/ -o
username=myuser,password=mypass

The error is:
8465: tree connect failed: ERRDOS - ERRnosuchshare (You specified an invalid
share name)

When I omit the last portion of the service path it works just fine:
smbmount //servername/home /mnt/media/server/ -o
username=myuser,password=mypass

Trouble is, I don't want to mout the 'root' of the share, I want to mount a
subdirectory within it.

On a w2k box this syntax works fine:  'net use m: \\server\home\media' and
it properly mounts the path as the m: drive.  I do recall that win9x boxes
could not mount subdirectories of shares.  Is samba likewise crippled?

So what gives here?  Can smbmount not mount from a pathname within a
service?  Or am I missing the n necessary magical command line incantation?



Late reply, but anyway:

What you *can* is the following:

smbmount //servername/home /tmp/foo -o username=myuser,password=mypass
mount --bind /tmp/foo/media /mnt/media/server
umount /tmp/foo

Or at least it works for me, at least with CIFS mounts.


--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/listinfo/samba