I've ported Samba 3.0.14a to Windows (Cygwin) (via a plugin for BartPE)
Submitted by ross on Wed, 06/29/2005 - 16:30
A Samba plugin is now available at samba.zip. It uses a Cygwin port of Samba 3.0.14a. Here's the makefile samba.mak and the patch samba-3.0.14a.cygwin.patch.
The plugin's help file is available here. This plugin requires the Cygwin plugin cygwin.zip.
You can also run Samba inside "normal" Windows, such as XP, 2003, or 2000. Details are here.
»
- ross's blog
- Login or register to post comments

Ross, According to testparm
Ross,
According to testparm upcase.dat (and a couple of other files) should be located in z:/samba/lib where in fact they are located in z:/samba
Ross, When Cygwin plugin
Ross,
When Cygwin plugin refers to PESetEnv plugin, is that needed?
Thanks
VW
VeeDub
You either need PESetEnv, or you need to manually set the required environmental variables.
Samba diagnostics
Hi,
I think I've identified at least one of the issues, according to testparm upcase.dat should be located in z:/samba/lib where in fact it is located in z:/samba
At the moment I am not sure where this is configured. I will keep looking.
VeeDub,
Which file did you install from, and are you installing into BartPE, or Windows XP, or ?
Hi Ross, Your Samba
Hi Ross,
Your Samba plugin.
BartPE with XPE.
VW
VeeDub
The plugin worked for me the last time I used it.
What is the error message, if any, that you are getting?
Samba diagnostics
Here's the output from the latest test
Y:\samba>smbclient -L localhost -U guest%password
INFO: Current debug levels:
all: True/10
tdb: False/0
printdrivers: False/0
lanman: False/0
smb: False/0
rpc_parse: False/0
rpc_srv: False/0
rpc_cli: False/0
passdb: False/0
sam: False/0
auth: False/0
winbind: False/0
vfs: False/0
idmap: False/0
quota: False/0
acls: False/0
doing parameter workgroup = WORKGROUP
doing parameter server string = %h
doing parameter security = user
doing parameter hosts allow = 192.168. 127.
doing parameter load printers = no
doing parameter printcap name = /samba/printcap
doing parameter guest account = guest
doing parameter log file = /samba/logs/log.%m
doing parameter socket options = TCP_NODELAY
doing parameter interfaces = 192.168.200.20/24 169.254.68.102/24 169.254.135.38/24
doing parameter dns proxy = no
pm_process() returned Yes
lp_servicenumber: couldn't find homes
set_server_role: role = ROLE_STANDALONE
Attempting to register new charset UCS-2LE
Registered charset UCS-2LE
Attempting to register new charset UTF-16LE
Registered charset UTF-16LE
Attempting to register new charset UCS-2BE
Registered charset UCS-2BE
Attempting to register new charset UTF-16BE
Registered charset UTF-16BE
Attempting to register new charset UTF8
Registered charset UTF8
Attempting to register new charset UTF-8
Registered charset UTF-8
Attempting to register new charset ASCII
Registered charset ASCII
Attempting to register new charset 646
Registered charset 646
Attempting to register new charset ISO-8859-1
Registered charset ISO-8859-1
Attempting to register new charset UCS2-HEX
Registered charset UCS2-HEX
Attempting to register new charset CP850
Registered charset CP850
Attempting to register new charset CP437
Registered charset CP437
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
map_file: Failed to load z:/samba/lib/upcase.dat - No such file or directory
map_file: Failed to load z:/samba/lib/lowcase.dat - No such file or directory
creating lame upcase table
creating lame lowcase table
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
Substituting charset 'US-ASCII' for LOCALE
map_file: Failed to load z:/samba/lib/valid.dat - No such file or directory
creating default valid table
added interface ip=192.168.200.20 bcast=192.168.200.255 nmask=255.255.255.0
added interface ip=169.254.68.102 bcast=169.254.68.255 nmask=255.255.255.0
added interface ip=169.254.135.38 bcast=169.254.135.255 nmask=255.255.255.0
Netbios name list:-
my_netbios_names[0]="ZEB-DEV"
Client started (version 3.0.14a).
internal_resolve_name: looking up localhost#20
Opening cache file at y:/samba/gencache.tdb
Returning valid cache entry: key = NBT/LOCALHOST#20, value = 127.0.0.1:0, timeout = Fri Oct 12 22:51:41 2007
name localhost#20 found.
Connecting to 127.0.0.1 at port 445
timeout connecting to 127.0.0.1:445
Connecting to 127.0.0.1 at port 139
timeout connecting to 127.0.0.1:139
Error connecting to 127.0.0.1 (Operation now in progress)
Connection to localhost failed
Y:\samba>
Appreciate any advice you can offer.
Thanks
VW
Not working because cygwin1.dll not found
OK I've now added the ldap package and get the following error when testing with:
smbclient -L localhost -U guest%password
Error message:
Unable to open configuration file y:/samba/smb.conf
I don't know where the Y: drive is coming from, the system drive for Bart is always X:
smb.conf is located in X:/programs/samba/ramdrv/samba
A setup doc would be handy if you have one
Thanks
VW
cygldap-2-2-7.dll was not found
It looks like the ldap package is not installed by default
Not working because cygwin1.dll not found
Hi Ross,
I am trying out your Samba plugin with BartPE.
I have added the Samba plugin and the Cygwin plugin to my Bart build.
After the build I have the Samba directories and the Cygwin directories, but when I try to test the Samba installation with command:
smbclient -L localhost -U guest%password
I get the above error message
Any suggestions on things to try?
Also if I get this working I want to add a user and change the default password for the existing shares. I understand that I do this with smbpasswd. What files are updated, as I would like to update these files in the build.
Thanks for the plugin, assuming I can get it to work will be very useful.
You might like to post your plugin in the 911cd forums (http://www.911cd.net/forums//index.php), as there is an active Bart forum there.
VW
Fixed the cygwin1.dll error
Read the cygwin.htm file!
SAMBA patch for CYGWIN
Hello,
I tried out your binaries but finaly I dicided to compile the code by my own. (Because of fixed path statements in the binaries which are not fine for my installation system). The patch you offer in your submit is titled with version 3.0.13, but after downloading I saw that its a Patch for 3.0.4. Can you please correct this issue?
I tried out your Patch with 3.0.4 code and it works fine. I compiled the binaries on a Windows XP Professional and I'am using the standard path "/user/local/samba....". Objective is for me to have a WINS Server running in my LAN without having to license a WINDOWS SERVER. So it seems to be necessary to have this in place in order to browse with "MY Network Places" vÃa (Open-)VPN Connections, because the Netbios Broadcast are limited by Subnet.
The patch applies cleanly to 3.0.14
I've updated the patch http://www.smithii.com/files/samba-3.0.14a.cygwin.patch. It applies cleanly to 3.0.14, and 3.0.14a. Good luck.
can this run as a PDC?
hiya - i've been looking into a cheap way of running a PDC on a network without having to shell out for windows server licenses. my plan was to run linux, but unfortunately the server needs to run several windows-only programs. if your port of samba can act as a PDC, then that would appear to solve the problem.
is this a proper port of samba to win32, or is it just for BartPE? i'm slightly confused...
any thoughts?
cheers
rory@mungler.com
Running Samba Under Windows
Rory,
It's a "proper" port, but it does use Cygwin, so some would argue it's not a true port.
Using the following instructions, you should be able to run Samba as a PDC, on XP, 2003, 2000, or any other flavor of Windows:
: http://smithii.com/?q=node/view/36
Let me know if you attempt it, and your results, good or bad.
Good luck!