[Samba] Compile Samba for Windows Use - SMBClient.exe mainly

Allan P. Dynes ADynes at WHGardiner.com
Tue May 24 17:26:29 UTC 2016


One last update.  The issue was with Cygwin 64-bit, I was able to compile 3.6.25, well at least the smbclient, on my Windows 7 Pro x64 machine using Cygwin 32-bit using the standard ./configure then make pch then make just like I was able to using Windows XP.  Same issue, it fails at net.exe, but by then it already created the smbclient.exe which is all I needed.

I could not get any part of Samba 4 to compile using Cygwin.  Configure fails with no descriptive error message as Jeff confirmed.  But 3.6.25 seems fine for my use.

-Allan

-----Original Message-----
From: Allan P. Dynes 
Sent: Monday, May 23, 2016 2:57 PM
To: Allan P. Dynes; Chris Weiss
Cc: samba at lists.samba.org
Subject: RE: [Samba] Compile Samba for Windows Use - SMBClient.exe mainly

I just wanted to give everyone a update.  I was able to compile the smbclient.exe file successfully using Samba 3.6.25.  Compiling the entire suite fails but all I was after was the client.  I referenced back to an old post here https://lists.samba.org/archive/samba-technical/2007-September/055557.html that had instructions on compiling on Windows.  Used it as a rough guide.  Long story short:

Installed Windows XP SP3 32-bit on a virtual machine (VirtualBox) Installed CygWin 32-bit with the Devel files Extracted Samba 3.6.25 Went into the Source3 directory Ran (per the post from 2007):

./configure --prefix=/usr/local/samba
make pch
make

The make failed trying to create the net.exe file:

utils/net.o:net.c:(.text+0x10e1): undefined reference to `libintl_setlocale'
collect2: error: ld returned 1 exit status
Makefile:1816: recipe for target 'bin/net.exe' failed
make: *** [bin/net.exe] Error 1

But it had previously in its routine already built the SMBClient.exe file that I needed.  I then tested it within Pydio and sure enough the issues I was having with the older SMBClient (3.0.23 and 3.0.7) and gone....I can successfully write a file to a new Server 2012 R2 file share with the newly compiled client that I couldn't with the older ones.   I also verified the version was updated:

C:\temp>smbclient -V
Version 3.6.25

I'm sure no one will ever care about this knowledge or the file but it fixed my issue and now Pydio is "complete" as a cloud file sharing solution for me.

-Allan

-----Original Message-----
From: samba [mailto:samba-bounces at lists.samba.org] On Behalf Of Allan P. Dynes
Sent: Monday, May 16, 2016 8:37 PM
To: Chris Weiss
Cc: samba at lists.samba.org
Subject: Re: [Samba] Compile Samba for Windows Use - SMBClient.exe mainly

The user for the site, and conversely php, is running as a application pool in IIS specifically for the site and as such only exists on that box.  The nice thing about using the samba client, if I can get it to work, is you can pass through the user credentials of the logged-in user. So security-wise it's a lot easier to maintain as users would have access to the same things they already do on the remote file server.  If they didn't have access before then they still wont.


Sent from my Verizon, Samsung Galaxy smartphone


-------- Original message --------
From: Chris Weiss <cweiss at gmail.com>
Date: 5/16/16 6:04 PM (GMT-05:00)
To: "Allan P. Dynes" <ADynes at WHGardiner.com>
Cc: samba at lists.samba.org
Subject: Re: [Samba] Compile Samba for Windows Use - SMBClient.exe mainly

does Pydio not accept UNC paths in place of a local path?  this has worked for me in other php things, as long as IIS is running under an account with network share permissions.



On Mon, May 16, 2016 at 4:39 PM Allan P. Dynes <ADynes at whgardiner.com<mailto:ADynes at whgardiner.com>> wrote:
That's what I'm hoping for since I've been unable to compile on Windows 7 x64.  I am getting the same errors as Jeff, just a general compiler summary error with no real indication of what caused the issue.  I may also try compiling the older version using the makefile and patch Ross did at https://smithii.com/samba on XP first to make sure I can at least recreate the wheel and then move up to higher versions from there.  If I can't reproduce something someone already did then there is little chance I can compile a new one anyway and I'll have to look further into either tricking the Pydio software to remotely access a share or writing my own plugin to do it for me, both things I don't know if I'm capable of but I'm willing to try.

-----Original Message-----
From: Jeremy Allison [mailto:jra at samba.org<mailto:jra at samba.org>]
Sent: Monday, May 16, 2016 12:34 PM
To: Allan P. Dynes
Cc: Jeff Sadowski; Andrew Bartlett; samba at lists.samba.org<mailto:samba at lists.samba.org>
Subject: Re: [Samba] Compile Samba for Windows Use - SMBClient.exe mainly

On Mon, May 16, 2016 at 03:20:26PM +0000, Allan P. Dynes wrote:
> The couple people that did successfully compile it it seems were on Windows XP. I'm going to start up a 32-bit XP machine virtual machine and install only cygwin and what I believe are the dependencies and see how far I can get.   I'm currently out of town so I'll try it either later in the week or next week.

As Windows provides binary compatibility you might just be able to get a 32-bit WindowsXP binary to run on the Windows server you're targetting.

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba
--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


More information about the samba mailing list