Mounting smbfs more than one folder level deep

Not sure if this is the right place to post this!

Just wondering if there is a way to mount more than one folder level deep using mount_smbfs?

I'm using this command:
# mount_smbfs -I 192.168.0.55 '//USER@HOST/folder1/userhome' /mnt/userhome

But everytime it mounts (even in fstab) it will only mount /folder1 and not /folder1/userhome as I intended.

Am I missing something here?
 
That's the 'feature' of the samba - you can't mount subdirectories as you can do with NFS.

Workaround to this would be to share folder1/userhome too.
 
Thanks for the reply, not quite sure I follow what you mean.

Do you mean to do the first mount to folder1/ to say /mnt/folder1, then another mount right after that to /mnt/folder1/userhome to say /mnt/userhome?

Sorry for the formatting before.
 
What I meant to say is that do share the subdirectory on samba sever too. Under Windows that would mean to share e.g.:

Code:
d:\folder1
d:\folder1\username

I remember I had to do this on some version of Windows, not sure which one exactly (either XP or 2000).

--

But .. I did some tests on Windows 7 and Windows XP (SP3) and I was able to mount subdirectory (dir structure as above, only d:\folder1 shared) using:

# mount_smbfs -N //donky/folder1/username /mnt/donky/
# ll /mnt/donky/
Code:
total 18
drwxr-xr-x   1 root  wheel  16384 Jan  1  1970 .
drwxr-xr-x  10 root  wheel    512 Apr 20 22:55 ..
-rwxr-xr-x   1 root  wheel      0 Apr 20 22:58 username-files

Which is what you want. So I guess I was wrong that you can't do the subfolder mounts :|.
Did you check the /var/log/samba/* on server (client logs)?
 
Back
Top