getting smbnetfs to do the job

Hello everyone,

I try to mount a samba v2 share on FreeBSD.

We all (should) know that :
  • Samba v1 is dead
  • mount_smbfs //guest@host/samba_share /my_mountpoint won't work with Samba v2 or above.
Searching in this forum, smbnetfs (sysutils/fusefs-smbnetfs) appeared to be the way to go (see Thread samba-smbv2-client-under-freebsd.70242). According to Wozzeck.Live, it solved the issue. He wrote :
UPDATE
---------

I have tested again fusefs-smbnetfs and now it is working for SMBv2 + protocol.

So I've installed the package fusefs-smbnetfs (vers. 0.6.1) and, as root :
  • set up the *.conf files adequately
  • created a ~/mountpoint directory
  • issued the command smbnetfs ~/mountpoint
Now, if all was nice and sweet, I should have the "tada !" thing, that is, I should be able to gain access to the samba share simply issuing cd ~/mountpoint/username:password@computer_or_ip/share
and ls would list the files.

But alas, my ls (no pun intended ;)) only produced this lousy error message :
ls: .: Input/output error

My config is : FreeBSD 12.1-RELEASE-p2 GENERIC amd64

Is the trouble with me or with smbnetfs ?
 
It is working here. First I got the same IO error, then tried using traditional MS Windows domain's username notation with backslash, not @:
Code:
% cd ~/mountpoint/mydomain\\myuser:mypasswd@computer/share
% ls
file1 file2 file3
 
It is working here. First I got the same IO error, then tried using traditional MS Windows domain's username notation with backslash, not @:
Code:
% cd ~/mountpoint/mydomain\\myuser:mypasswd@computer/share
% ls
file1 file2 file3
Aragats, it does not help. When using smbclient, I can connect successfully :
Code:
smbclient \\\\192.168.0.100\\myshare
After being asked my login/password I can then list and change directory to the folder there.
But when I issue :
Code:
cd ~/mountpoint/192.168.0.100\\\\mylogin:mypassword@computer_name/share_name
still the same trouble (I/O error).
It will be just the same result if instead of giving the IP address, I give the domain name (in this case, WORKGROUP) that is, if I issue :
Code:
cd ~/mountpoint/WORKGROUP\\\\username:password@computer_name/share_name
 
It will be just the same result if instead of giving the IP address, I give the domain name (in this case, WORKGROUP)
There is no such thing as workgroup password. What is 192.168.0.100? I would try using your computer's name or IP address instead of domain name ― that's how you login as a local user in a domain member workstation.

Also, why are you using 4 backslashes? One extra to escape is perfectly working for me.

I agree, it's kind of tricky to make the smbnetfs working. You can also use a config file smbnetfs.conf to store your credentials instead of typing them, IMO it's much better anyway. I don't remember (at the moment have no access to the box with smbnetfs installed) its exact location, either in the home directory or ~/.smb).
 
Hi Aragats.
I use 4 backslashes in order to get only 2 ;-) and I'm not kidding.
When typing, you need to type it four times in order to get the two backslashes sequence.
. What is 192.168.0.100? I would try using your computer's name or IP address instead of domain name
This is exactly what you suggest : I'm using an IP address instead of a domain name !!!!

What samba version is running on your network ?
 
What samba version is running on your network ?
I'm connecting to a Windows domain member computer, I think the server is Windows 2016 (maybe 2012 ― I have no access to it, it's a corporate network). I can try connecting to a stand-alone Windows machine, will report later.
 
Solved !!!

Commenting out every option in ~/.smb/smbnetfs.conf got smbnetfs to do the job.

And since my Samba share on the network doesn't ask for password, issuing those commands :
smbnetfs ~/mountpoint
cd ~/mountpoint/192.168.0.100/my_share

gave access to the remote files.

Thanks Aragats !
 
Back
Top