# Using Samba between FreeBSD and Windows 7



## hikerguy (Apr 20, 2013)

First, the background info:

Windows 7
VirtualBox 4.1.22
FreeBSD 9.1

Windows 7 in the host. FreeBSD is guest, FreeBSD was installed with no problems. I have a folder in Windows I want to share (c:vbox/SHARE). I right-clicked this folder and selected "Share with home group (RW)". In the FreeBSD VM, I can ping my Windows host by IP or hostname.

I tried the following command, and I get prompted for a password. I figured it was wanted my Windows password, but when I enter it, it just "hangs" (no prompt. Can't Ctrl+C or Ctrl+right-bracket to get back to the prompt). Opened another terminal window (Alt+F2) and tried again, this time entering the password I use to log into FreeBSD. Same issue. Here's the command:

`sudo mount_smbfs //hikerguy@eno/SHARE ~/WINSAHRE`

WINSHARE is the directory I created in FreeBSD that I want to share with Windows.

Any ideas on how to get this working? I've done a lot of research, went through a tutorial to install Samba, but I just can't seem to get this working. Any help is MUCH appreciated.

Thanks,

Andy


----------



## Toast (Apr 20, 2013)

Try with the "-N" switch.
`sudo mount_smbfs -N //hikerguy@eno/SHARE ~/WINSAHRE`

```
-N      Do not ask for a password.  At run time, mount_smbfs reads the
             ~/.nsmbrc file for additional configuration parameters and a
             password.  If no password is found, mount_smbfs prompts for it.
```


----------



## ShelLuser (Apr 20, 2013)

hikerguy said:
			
		

> I have a folder in Windows I want to share (c:vbox/SHARE). I right-clicked this folder and selected "Share with home group (RW)".


That's where you're going a bit wrong. Homegroups are a very specific way to set up shares, and although I'm not 100% sure, I doubt it's being supported by Samba.

Thing is: homegroups provide a whole new way of authentication between Windows environments, it was set up to make things easier on the end-user. To that end they also started using different security schemes.

So if you're not depending on homegroups my suggestion would be to turn that stuff off, and then resort to regular sharing. That's bound to work.

Although some of it does depend on your Windows 7 version, I'm not too sure how well this will go with Windows 7 home-premium for example since that has limited support for these things (in comparison to Windows 7 Professional, which I'm using, and up).


----------



## hikerguy (Apr 21, 2013)

I tried the -N option with no luck. It no longer asks for a password, but it just hangs (it never comes back with the $ prompt).

Also, I'm not clear when you say to use a regular share. The only options are:


```
Nobody
Homegroup (READ)
Homwegroup (READ/WRITE)
Specific people...
```

Any other ideas?

Thanks,

Andy


----------

