So in reference to getting Pydio working on a Windows Server 2012 R2 machine with IIS 8.5 I found that I wanted a workspace in Pydio to access a existing share on a 2012 R2 file server. I have a lot of files I don’t want duplicated on both servers. Now there are many workspace drivers available but since Pydio was designed originally for a *nix system the main way to access a Windows server is through Samba. Windows Server supports SMB, server message blocks, for file sharing among other things. Now on a *nix system you can just install Samba and then Pydio can use the Samba client to remotely access the Windows server. Problem is I want to use Samba on a Windows server to access another Windows server. So I started a hunt to find a ported version of the Samba client and it resulted in two pages out of the millions out there: https://smithii.com/samba which had ported all of Samba v3.0.23 over and https://www.leepa.io/lpackham/smbclient/ which had ported just the v3.0.7 client. So I started testing these clients and long story short they have issues with Windows servers. Mainly you can get directory listings using them and even pull files but you cannot create files nor push files to the Windows file server. After some research its due to changes, mainly security related, in the Windows servers SMB implementation….changes that were fixed in newer versions of Samba (https://www.samba.org/).
Smb Client Authentication
The SMB client file system is based on the SMB protocol version 2.1 and version 3.0.2. You can use the SMB client file system to access files on an SMB server. The SMB server is a server that runs Windows Server 2012 or Windows Server 2016 operating system. In each of these server operating system types, a directory can be exported as a share. The smbclient command is a multifunctional tool that acts (among other things) as an FTP-like client for Samba. This tool can be quite handy when all else fails. The biggest drawback is when you.
So I determined that the only possible way to get my Pydio install to access my existing Windows file server was to either use the FTP over SSH plugin and enable this on my file server, which I didn’t want to do, or figure out a way to compile the Samba client using the latest source. After lots of trail and error I was able to partially compile Samba 3.6.25 using Cygwin (https://www.cygwin.com/) but where it failed was after it had built the smbclient.exe that I needed. I took the client and copied it to the server and tried running it from a command prompt and it complained about needing some Cygwin DLL files which was expected. I copied over the DLL files it needed to the server and was able to connect to the file server. I then updated Pydio to use my newly compiled smbclient.exe and Pydio now works as expected allowing e to share out a existing share from another server. The best part is since user credentials are passed through the existing NTFS permissions still apply on top of Pydios own permission checks.
Not sure if anyone in the world will ever need it but just in case here it is: smbclient.zip. Keep in mind you will need to install Cygwin on the same machine and at the very least copy the DLL files it needs out of C:cygwinbin to the directory with the client.
Smb Client Mac
Smb Client Windows
This option is used by the programs in the Samba suite to determine what naming services and in what order to resolve host names to IP addresses. The option takes a space-separated string of different name resolution options.
The options are :'lmhosts', 'host', 'wins' and 'bcast'. They cause names to be resolved as follows:
lmhosts
: Lookup an IP address in the Samba lmhosts file. If the line in lmhosts has no name type attached to the NetBIOS name (see the lmhosts(5) for details) then any name type matches for lookup.host
: Do a standard host name to IP address resolution, using the system/etc/hosts
, NIS, or DNS lookups. This method of name resolution is operating system dependent, for instance on IRIX or Solaris this may be controlled by the/etc/nsswitch.conf
file). Note that this method is only used if the NetBIOS name type being queried is the 0x20 (server) name type, otherwise it is ignored.wins
: Query a name with the IP address listed in thewins server
parameter. If no WINS server has been specified this method will be ignored.bcast
: Do a broadcast on each of the known local interfaces listed in theinterfaces
parameter. This is the least reliable of the name resolution methods as it depends on the target host being on a locally connected subnet.
If this parameter is not set then the name resolve order defined in the smb.conf(5) file parameter (name resolve order) will be used.
Smb Client Windows
Smb Client Kali
The default order is lmhosts, host, wins, bcast and without this parameter or any entry in the name resolve order
parameter of the smb.conf(5) file the name resolution methods will be attempted in this order.