I'm in a situation where I need to mount the UNC root, i.e. "\" or "smb://". I can open up nautilus and go to "smb://" but I need to actually do things with that, such as: readdir, mkdir, unlink, rmdir, open, read, write, etc. from the standard POSIX filesystem APIs. Is there existing software that lets me do that?
mount -t cifs "//" but it gives me
mount error: UNC name too short
I've also tried
mount -t cifs "smb://" but that gives me a
Mounting cifs URL not implemented yet. Attempt to mount smb://
I've tried all those smb commands of old, but they're no longer present - I believe which have moved to cifs instead. I've also tried these fancy new gvfs / gio things, which I suppose is a gobject based userland mounting system, but
gio mount smb:// gives me...
gio: smb:///: Location is already mounted
... Mounted where? I can go to it in nautilus, but again I can't do anything with that. I thought it might be mounted at /run/user/1000/gvfs but that program-fuse-folder-thing doesn't seem to do much on it's own unless I specifically mount things using the command.
I don't even really require to be able to list smb:// or even smb://server/, but I need ALL smb://server/shares/ to be available, which the same functionality as if I had mounted them using smb or gvfs (e.g. listing, making folders, deleting things, opening files, and also authentication).
To further clarify, any and all applications need to be able to basic perform filesystem API functions on any and all unc paths, at least to the extent provided by gvfs or cifs. For example, I should be able to:
cd /some/path/server1/share1/folder1 cat file1 mkdir newfolder2 cd ../existingfolder3 touch file2 cd /some/path/server2/share2 rmdir existingfolder4
... etc. Bonus points if I could
There are plenty of fuse libraries out there, so I was considering writing a little script that automatically mounted the shares when requested, and then just passing through the commands to the mount points, but I certainly don't want to reinvent the wheel, and I'd also love for something much for portable than anything I would have the time to develop. But if this is the easiest way then I can start writing some code and either post it here or start a new question when I need help with it.