View Full Version : smbnetfs+fuse+pam_mount to browse samba network
mirak63
July 11th, 2006, 11:07 AM
hi, I was toying with SMBnetfs wich is a Fuse file system.
This one allow you to mount a full samba network on the file system, you then can browse within the network like you are just doing with windows.
What I did was patching libpam_mount to allow to run smbnetfs process as user. In fact pam_mount allow that already, but it needed a custom mount line for fuse.
Now what happens is when I login through gdm or a console or ssh, whatever, it mounts the network for my user in /network/mirak63 (it could be in /mnt/network/mirak63 or /media/network/mirak63 and I can put indivudal settings in /home/mirak63/.smb/acces.conf like passwords to particular shares, timing options etcetera.
If I put a shortcut to that location in nautilus, or just put a symlink on the desktop.
Now any user have samba acces and can use any application including command line to browse samba network, something that the gnome-vfs cannot provide.
I think it would be intersting to have that out of the box.
I mostly need to convince libpam_mount developper to give a look to the patch, he didn't had much time recently. https://sourceforge.net/projects/pam-mount
And also smbnetfs must be packaged. http://smbnetfs.airm.net/
mirak63
July 11th, 2006, 12:10 PM
if not as a default, I still ask if you are interested at least to have smbnetfs package as well as patching libpam_mount.
if some people are interested in that even if not as the default I will try to push the developper a bit to incorporate my patch or at least give a serious look at it.
mirak63
July 12th, 2006, 09:39 AM
anyone one have some suggestion ?
hazart
July 12th, 2006, 05:25 PM
I think it would be best to implement better network browsing directly in GnomeVFS. A suggestion has already been made to make GnomeVFS use FUSE instead of it's "backends". This would make use of smbnetfs entirely possible. I think it's somewhere in the forum, or on the launchpad specs.
mirak63
July 13th, 2006, 03:17 AM
if all the apps have to go through gnome VFS I don't see the point.
The only grippe of gnome against Fuse is that it's not portable to something else than linux and bsd, while gnome can be used on more platforms.
I think that people who talk about gnome-vfs instead of fuse miss the point that smbnetfs have an interest even on server platforms without a X server while gnome-vfs haven't.
And honestly gnome-vfs is just bad from the begining. if you use totem or gxine with gnome-vfs URI seeking in a movie is just horrible, but if you use smbmount or smbnetfs it's very smooth.
mirak63
July 13th, 2006, 05:41 AM
Probably gnome could allow both, with for exemple a gconf setting that redirect the network icon on the gnome desktop to a mount point of your choice.
It would be a nice integration. Then later something like a systray icon proposing to enter a password when fuse asks one could be added. But I don't think fuse can do that yet.
bda
July 20th, 2006, 04:21 AM
I think it would be great to have SMB browsing work out of the box in Ubuntu. I think the user should be asked first though - perhaps during installation and/or first sign in. Network browsing uses resources, and I don't like the idea of running things without asking the user first.
I'm curious why you chose smbnetfs over fusesmb. They both seem to provide the same functionality, but fusesmb is already packaged in edgy. I've only done very basic testing - does anyone know if there is a good reason to choose one over the other?
Is pam-mount the best way to handle mounting? I'm curious what other options there are. I came across some links about starting and stopping fusesmb per session. They seem to focus on KDE, but they still might be useful:
http://www.mail-archive.com/hints%40linuxfromscratch.org/msg00226.html
http://linux.bononline.nl/linux/pamscript/
On the fusesmb site there is a TODO about using DBUS to integrate with desktop environments.
I'm very happy to see seamless SMB network browsing in Linux - I've been waiting for this since I started using Linux 8 years ago. The gnome-vfs/kio solutions are limited to gnome/kde apps, and I've always had problems with the kio slave.
mirak63
July 20th, 2006, 04:41 AM
I choosed smbnetfs because I found it first, or for the same reason you would prefer coca cola over pepsi and vice versa. :p
I didn't realised fusesmb was pacakged already, that's nice.
I have seen a pacakge for smbnetfs in debian experimental.
In fusesmb I don't see a feature like that :
"cd mountpoint/username:password@computer_or_ip"
The acces by ip, plus the login directly in the path, though it's really not secure :p
The advantage of pam_mount is that it's a generic solution to mount things at login and already used. It requires just a litle patch to use fuse to it's best, but I am in contact with the dev.
Also pam_mount allow to have global settings or user settings.
so if libpam_mount fuse and fusesmb is installed and setup to be enabled at logins of any kind and with user settings, then you just have to have a ~/.pam_mount.conf with the uncommented default fusesmb mount and it's fine.
punkass
July 20th, 2006, 07:38 PM
I am not using Edgy yet but anything that makes samba shares easier and more transparent to applications seems better to me. It kills me when I go to say..get an attachment in Thunderbird off my shared server but I cannot because Thunderbird does not have access to vfs shares. I will assume that wine applications could then access shares easily as well.
I also like the idea of being able to ssh in and have the shares accessible.
mirak63
July 21st, 2006, 06:21 AM
ok, I am thinking how to integrate that as transparently as possible.
fuse module must be in /etc/modules and dekstop users must be in fusegroup at creation time.
Then libpam_mount needs to be patched. In upstream it would be nice, don't know when it will happen.
Then libpam_mount.conf in /etc/security should accept user configuration.
for global configuration, /network/ folder should be created.
A user would then acces samba in /network/$USER/ or it could be in /home/$USER/network/ or just a symlink.
It would be a mini revolution for linux networking :p
mirak63
July 21st, 2006, 06:32 AM
it would be nice to have the network icon of gnome redirect to the place where it's mounted.
mirak63
July 29th, 2006, 09:22 AM
the pam_mount dev have included some modification upstream for fuse, so we need to have an upgraded pam_mount packaged.
vBulletin® v3.7.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.