# samba: where are my windows shares?



## damarious25 (Jan 9, 2012)

Used this guide to install samba for FreeBSD 8.2. The guide is old but was very useful. It worked perfect and now I can use any windows machine on the network, find the FreeBSD box, enter a users name/password and boom, I'm in. But that's not what I wanted to do.

I'm trying to allow any user who logs into the FreeBSD box the ability to see Windows shares in their home folder. All I could find were people who had problems _after_ setting it up. Googling for how-to's is what led me to the guide I linked above.

- need to know how to add Windows shares to a single FreeBSD box.
- would like them to auto-mount on startup.
- Windows machine does have a username/password.
- would like Windows username/password saved for all FreeBSD users so I don't have to add extra users to Windows box.
- FreeBSD users only need to browse windows shares (and sub folders) with read permissions.
- both machines have static IPs and there's no local DNS.
- FreeBSD box is also running Apache22, ftp and ssh (not sure that matters?).

I'm just wondering if anyone has link that can help me as I find The FreeBSD Handbook doesn't really explain it enough for n00bs and the Samba HOW-TO collection is daunting and over technical for what I'm trying to do here.

Any advice?
Thanks!


----------



## damarious25 (Jan 9, 2012)

Still not solved.
/root/.nsmbrc = correct

/etc/fstab
[CMD="//USERNAME@HOST/share /home/user/share   smbfs   rw,-N,noauto   0   0"][/CMD]
This works and mounts one share, but as I said, I want the share to appear in the home directory of all the users who log into the BSD box. But any time I try to add additional shares to /etc/fstab it fails on boot. 
I.E.

```
//USERNAME@HOST/share1 /home/user[B]1[/B]/share1   smbfs   rw,-N,noauto   0   0
//USERNAME@HOST/share2 /home/user[B]1[/B]/share2   smbfs   rw,-N,noauto   0   0
//USERNAME@HOST/share1 /home/user[B]2[/B]/share1   smbfs   rw,-N,noauto   0   0
//USERNAME@HOST/share2 /home/user[B]2[/B]/share2   smbfs   rw,-N,noauto   0   0
```

Even just mounting multiple directories for a single user doesn't work. 
I.E.

```
//USERNAME@HOST/share1 /home/user[B]1[/B]/share1   smbfs   rw,-N,noauto   0   0
//USERNAME@HOST/share2 /home/user[B]1[/B]/share2   smbfs   rw,-N,noauto   0   0
```

Maybe I need to select a single mount point on the BSD box and then add shortcuts to that mount point in all users home directories? Either way, I have about 10 directories I need to share, and if there's only a single mount point wouldn't that make organizing them a complete mess? Or, can I add each directory to the /etc/fstab
I.E.

```
//USERNAME@HOST/share1,share2,share3, /example/share1,share2,share3   smbfs   rw,-N,noauto   0   0
```

and then create short cuts to /example/share1,share2,share3 in each users home directory?


----------

