I'm having issues mounting a domain Windows share. I can mount it just fine on my Mac which uses a similar mount_smbfs as FreeBSD as far as I can tell. I have tried every known option or setting in the command but nothing is working. So below is the details of my Windows share detail. Can someone tell me exactly how the format of the mount_smbfs should go? I appreciate any help.

Domain Login: ehc\username
Server IP: 172.16.20.50
Server NetBios name: ehcfilesvr
Server FQDN: ehcfilesvr.ihc.domain.com (ihc is different than the domain login above, ehc)
Share source: ehcfilesvr\folder\share
FreeBSD mount point: /mnt/winshare

Btw, I can ping the server fine from my FreeBSD box. When trying to run the mount_smbfs, two errors I get are mount_smbfs: unable to open connection: syserr = Connection refused. or mount_smbfs: empty share name
 
Hi gentoobob

I think it should be something like mount_smbfs -I 172.16.20.50 //username@ehcfilesvr/folder/share /mnt/winshare

Hope it works for you :)

Regards Stig
 
Hi gentoobob

I think it should be something like mount_smbfs -I 172.16.20.50 //username@ehcfilesvr/folder/share /mnt/winshare

Hope it works for you :)

Regards Stig


Thanks Stig...I have tried that. It does not work. It results in one of the errors. I have also used the -W ehc option and for the -I option I have used the FQDN for the server, same errors.
 
Thanks gentoobob

I am not sure if it helps you but I have tried to replicate the error
Code:
mount_smbfs: empty share name
. I get the error response when I try to open a share on the server which does not exist. Can the name of the share be wrong or is it not shared as expected?

Regards Stig
 
Thanks gentoobob

I am not sure if it helps you but I have tried to replicate the error
Code:
mount_smbfs: empty share name
. I get the error response when I try to open a share on the server which does not exist. Can the name of the share be wrong or is it not shared as expected?

Regards Stig


No, it exist. Its the same share/folder path that my Mac is using.
 
That is weird.

As a last thing, I tried to connect to my test samba server with a mac. I tried two different things.
The first I only specified the server smb://hummingbird, when I did this OS X gave me a choice af folders on the server.
The second time I tried to specify a share that does not exist smb://hummingbird/test, this gave a timeout.

Since you don't get a time-out and OS X doesn't prompts you with a choice of folders when you connect, then the command path to the folder must be correct.

I think the problem must be elsewhere then the command - it could be a firewall configuration issue. Which firewall are you running?
 
Thanks for trying that. I will give it a try and let you know. I'm not running any firewalls on the laptop that has FreeBSD on it. I pretty much use the laptop to console into my Cisco gear and I need to get to a Windows share sometimes to get a config for a particular device. Which is why I'd like to be able to mount it. I will give you example a try and let you know.
 
And according to some documentation I could even use the line mount_smbfs -I "ip address" //DOMAIN;USER:pASSWORD@server/share/share /mnt/share and when I use that, I also get the "empty share name" error and it doesn't prompt me for a password. Something is amiss. Will keep playing with it.
 
Do you tried connecting to the Windows machine with smbclient -L <your_win_machine>?

Then going further with smbclient -k //<your_win_machine_fqdn>/<Share> to see if you can connect. Might be domain share requires Kerberos authentication, instead of the older NTLM so that means digging a bit deeper then.
 
Do you tried connecting to the Windows machine with smbclient -L <your_win_machine>?

Then going further with smbclient -k //<your_win_machine_fqdn>/<Share> to see if you can connect. Might be domain share requires Kerberos authentication, instead of the older NTLM so that means digging a bit deeper then.

Right on. No I hadn't tried that. Only saw old forums that used smbclient so I didn't think it was still a valid tool. I will give that a whirl tomorrow morning and let you know. Thanks for that bit of info.
 
Rudelgurke, I installed smbclient and it worked fine and without the "-k" option. So if its not using Kerberos then I'm stumped on mount_smbfs command. My smbclient worked with smbclient //server/share -W DOMAIN -U USERNAME.
 
If your network share is not full open but protected with a password.... it could be a simple problem of password storage.

mount_smbfs(8) uses primarily the password and server definitions located in /etc/nsmb.conf. Server and password must be declared as follow :


Code:
[SERVERNAME] => in upper case !!!!
charsets=UTF8:cp850 => (or cp437 for english us)
addr= dns name if you have setup a local name resolver of simply the IPv4 address

[SERVERNAME:USERNAME] => in upper case even if Username is recorded with mixed lower and upper case at server
password= eventually use "" quotation if your password has blank spaces

Note : the USERNAME and PASSWORD must match an account open in samba/windows server. You must check that root has the ownership of nsmb.conf and that it is protected with chmod 600

So you should be able to simply connect with :

mount_smbfs //USERNAME@SERVER/share_name /mnt/mount_target_dir

If not working, disable you firewall. Some bad rules may block the connection
 
Back
Top