# session setup failed: SUCCESS - 0



## piggy (Dec 19, 2010)

My BSD machines:


```
FreeBSD freebsd8vm 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:55:53 UTC 2010     
root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

FreeBSD pcbsd8 8.1-RELEASE FreeBSD 8.1-RELEASE #1: Sat Jul 17 14:19:59 PDT 2010     root@build8x64.pcbsd.org:/usr/obj/usr/pcbsd-build81/fbsd-
source/8.1/sys/PCBSD  amd64
```
I keep getting that message when I try to connect via Samba to my Windows 7 machine on the network. It just happen with my two BSD boxes (both x32 and x64 make no difference). Linux machines on the network (from various Archlinux to Fedora and some Debian) are not affected by the problem.

I didn't had the problem for ages, this network is up and running and configured by like two years without any problem. I didn't changed anything in machines configurations, I just update everything to the latest update as I usually do (both BSD boxes and Windows boxes).

No info can be retrieved from BSD or Windows logs. So, for the first time in ages , I don't know how to handle this.

Here the Samba version I do use on both BSD machines:


```
samba34-3.4.9       A free SMB and CIFS client and server for UNIX
samba34-libsmbclient-3.4.9 Shared libs from the samba package
samba34-nmblookup-3.4.9 NetBIOS Name lookup tool
```

I forgot to say: Windows 7 machine can access the BSD data pretty well, Linux machines can access BSD data and BSD machines can access Linux data pretty well over the same Samba. Same for Linux ---->>> Win 7 and Win 7 ---->>> Linux. The problem is just in the direction BSD ----->>> Win 7.

What happen: the connection via Netbios over TCP works fine then it ask for the password and Windows 7 machine refuse the password. Example:


```
<piggy@freebsd8>/usr/local/etc # smbclient -L win7machine
Enter piggy's password: 
session setup failed: SUCCESS - 0
<piggy@freebsd8>/usr/local/etc #
```

Any idea?


Thankx!


----------



## piggy (Dec 20, 2010)

Ok, I found the problem myself: Windows 7 smb stack recent update block any connection from machines with a samba version under 3.5.6. So my FreeBSD used 3.4.x and wont connect anymore.

I deleted 3.4.x from my system and installed via ports 3.5.x and now FreeBSD ---->>> Windows 7 path works again 

Then there is a new problem: Dolphin in KDE and Nautilus in Gnome are unable to browse the shares becouse they complain of missing libsmbclient. Under the ports tree there is just a libsmbclient and it seems it only work with samba 3.4.x version and it pretend to install samba 3.4.x.

Any idea how I can have a libsmbclient working with samba 3.5.x?


----------



## piggy (Dec 23, 2010)

It is incredible no one have faced this problem before then this cutie little piggy solved the problem by hisself. And I want to share with all of u guys to help someone havin the same problem.

It is indeed incredible, then samba-libsmbclient is for now just officially compatible with samba-3.4.9, a very old and buggie version of Samba, for example not supported anymore by Samba stack under Windows.

Then samba-libsmbclient can work with samba-3.5.6 package then to correctly compiling it and avoiding the install of very old and evil samba-3.4.9 it is needed to change a simple string in the samba-libsmbclient Makefile.

U need to change:


```
SAMBA_PORT=             samba34
```

with:


```
SAMBA_PORT=             samba35
```

Then everything compile fine. If u do not have samba-3.5.6 installed, samba-libsmbclient will install it for u, and if u do have it, samba-libsmbclient compile fine against it.

Deep testing show everything is working fine under Gnome and KDE4 and generally speaking any apps needing libsmbclient and Windows 7 clients updated to the latest samba stack (by december security updates) now authenticate fine against Freebsd boxes requests! 

PS: this time this cutie little piggy didn't had a great service from the community, but the DutchDemon posts editing


----------

