# Mounting Windows 7 share using Samba [SOLVED]

## C-TZ

I'm not able to share this folder using CIFS and I've added this to smb.conf:

client ntlmv2 auth = yes

maxprotocol = smb2

BlueAngel kevin # mount -t cifs //192.168.1.100/htdocs /mnt/htdocs

Password: 

mount error(13): Permission denied

Refer to the mount.cifs( :Cool:  manual page (e.g. man mount.cifs)

(192.168.1.100 is also in /etc/hosts as serverkantoor)

The password is entered correctly, I've tried this about 50 times during the day with different settings.

Can somebody please help me with this? I've been searching online but can't find concrete information.

----------

## Kaso_da_Zmok

try some username?

```
mount -t cifs //IP_OR_NAME/SharedFolderName /mnt/sharedfolder -o "username=X,passwd=Y"
```

----------

## C-TZ

I still get this error:

mount error(13): Permission denied

Refer to the mount.cifs( :Cool:  manual page (e.g. man mount.cifs)

----------

## C-TZ

But thanks for clearifying that -o option for me.. tried it without the " " double quotes ^_^ before and it didn't work (obviously)

Problem still not solved.

----------

## section12

 *C-TZ wrote:*   

> But thanks for clearifying that -o option for me.. tried it without the " " double quotes ^_^ before and it didn't work (obviously)
> 
> Problem still not solved.

 

Not sure it'll help, but:

http://www.liberiangeek.net/2011/04/share-files-folders-ubuntu-11-04-natty-narwhal/

I've also heard that Microsoft's IPv6 implementation can be trouble with SAMBA. Most of my problems were authentication related as well, until I fiddled around with some group policies on Windows to make it more open to the connections.

http://social.technet.microsoft.com/Forums/en/w7itpronetworking/thread/ecda546e-5fa0-4c09-9f3c-3bd132c1be68

The third post down in that thread is what ultimately helped me last time around.

Good luck. Hope you get it working.

----------

## C-TZ

so client ntlmv2 auth = yes doesn't acctualy do anything.. I'm gonna try this on my server right now then let you know.

----------

## C-TZ

It is solved. Seems ntlmv2 does do something. The password for the server contained two characters which let bash think it needed to input a variable of some sorts.

So when I did:

mount -t cifs //192.168.1.100/htdocs /mnt/htdocs -o "username=192.168.1.100/server"

it asked me for the password, I provided it, and it worked!

----------

## section12

Awesome. Glad you got it all sorted.

----------

## Hu

 *C-TZ wrote:*   

> The password for the server contained two characters which let bash think it needed to input a variable of some sorts.

 When you use double quotes, it preserves internal whitespace, but does not suppress variable expansion.  So, if your password was $HOME, then your command would tell bash to invoke the mount command as -o username=user,password=/root, rather than the intended -o username=user,password=$HOME.  Use single quotes to suppress variable expansion.

----------

