Samba 4.x package support thread

Not really, i don't have much time for openWRT atm and just try to keep up with trivial version updates and i still need to cleanup the luci package. Ideally i also want to add hotplug support to the package, which is working in samba36. So far samba4 still compiles fine against 18.06.1 via my package-builder, so i don't see any big problems. If i have some spare time in the next 2 months i will give it a try and setup a PR.

Until that, if its not a problem, can you/someone point me to a tutorial, how could I compile/build for this for my own experimental use?
I am kinda new to this, so for only used the OpenWRT, never built something for it.

If you don't want to switch to snapshots, you can build the package via my:

or setup your own sdk build environment (create packages):
https://openwrt.org/docs/guide-developer/using_the_sdk

or setup a full dev environment (allows to create your own firmware + packages):
https://openwrt.org/docs/guide-developer/build-system/start

3 Likes

Get these errors all the time in the log when browsing:

Sat Nov 17 16:43:28 2018 daemon.err smbd[21669]:   get_ea_dos_attribute: Rejecting root override, invalid stat [tools/transmission/settings.json]
Sat Nov 17 16:43:29 2018 daemon.err smbd[21669]: [2018/11/17 16:43:29.115696,  0] ../source3/smbd/dosmode.c:302(get_ea_dos_attribute)
Sat Nov 17 16:43:29 2018 daemon.err smbd[21669]:   get_ea_dos_attribute: Rejecting root override, invalid stat [tools/transmission/stats.json]
Sat Nov 17 16:43:29 2018 daemon.err smbd[21669]: [2018/11/17 16:43:29.142179,  0] ../source3/smbd/dosmode.c:302(get_ea_dos_attribute)
Sat Nov 17 16:43:29 2018 daemon.err smbd[21669]:   get_ea_dos_attribute: Rejecting root override, invalid stat [tools/transmission/dht.dat]
Sat Nov 17 16:43:29 2018 daemon.err smbd[21669]: [2018/11/17 16:43:29.148806,  0] ../source3/smbd/dosmode.c:302(get_ea_dos_attribute)
Sat Nov 17 16:43:29 2018 daemon.err smbd[21669]:   get_ea_dos_attribute: Rejecting root override, invalid stat [tools/transmission/settings.json]

edit - nvm, they are just errors when I try to edit something I don't have permission to

I tried using Docker but in the readme it says Mac is broken right now. Is this still the case?

You mean the package-builder? Where does it say its broken?
The 1.0 release was tested on all 3 platforms and should still work.

I installed (via opkg /tmp ) the packages libgmp10_6.1.2-2, libnettle6_3.4.1-2, libpopt0_1.16-2, samba4-libs_4.9.4-2, samba4-utils_4.9.4-2, samba4-admin_4.9.4-2 and samba4-server_4.9.4-2 downloaded directly from https://downloads.openwrt.org/snapshots/packages.
Now reading " Provisioning a Samba Active Directory" from Samba 4 documentation, the first command that is referenced is samba-tool, but this is not found. I found (in /usr/bin) smbcacls, smbcontrol, smbcquotas, smbget, smbpasswd, smbstatus and smbtree.
Why is samba-tool not included or, how can I get it?
I'm trying to write an script to create an AD Server with Openwrt.
Tks,
carliedu

Its because the AD-DC version is not really tested by me, you need to enable the AD-DC build via build options. This will than build all the needed components, including the samba-tool + python2.

A easy way to-do this is via my https://github.com/Andy2244/openwrt-package-builder , enable menuconfig in the config file and than enable all the options you need, the resulting packages can be manually installed via cli or directly via hosting + luciui.

Hy Andy224, thanks for your prompt response.
I never ventured to build a package but I think It's time to try.
I'll keep you posted when I can start the setup after building the package.
B/R
carliedu

Can you have one WITHOUT Docker in requirements?

That's the normal SDK you can setup and use, check: https://openwrt.org/docs/guide-developer/using_the_sdk

PS: I utilize Docker to ensure all the needed components are installed and to-be able to build packages on Windows/macOS, without needing to setup your own VM. Its the quickest and easiest way i could think of to build your own packages.

Thank you.

In fact, i'm don't use VMs for cross-translation anymore as long as Windows have WSL (Windows Linux Subsystem) in W10 - fast and easy way to have Ubuntu/Debian/etc on windows machine. Check it.

I did and the filesystem performance is still bad, but my docker builder is just one of many options. One of the goals was to get a system that performs the same, no matter the host build system and gets reproducible results. So if there is a problem, all i need is the config.txt and i can reproduce the error, without having to worry about the external host system.
I did run into cases, where full blown linux systems like Ubuntu/Debian resulted into packages pulling in external host libs, because of some cross-compile bugs. So i also use docker to verify my packages, since they don't have a full system and only the parts that are explicitly required to build openWRT.

Ok.

Let's stop this offtopic, коллега, thank you for the link!

I can't find samba4 in the http://downloads.openwrt.org/releases/18.06.2/packages/arm_cortex-a9_vfpv3/packages repository--is that on purpose?

It's not showing up in any of the feeds when I search for it in 18.06.2

…and it won't become part of any future 18.06.x maintenance release either. samba4 was only added after openwrt-18.06 branch off master and also requires rather significant library updates (and library replacements) to build, this is too invasive for a maintenance (bugfix) release. You can expect samba4 to become part of the next major release (e.g. 19.02.0), which is yet to branch off master, though.

1 Like

Not really, i made sure we have the compatible libs in 18.06 when i did the main PR. The reason is simply that the package only was stabilized in december and i wanted to try cleanup the luci part for it, before doing a backport PR. Than RL got into the way and the last weekends i was working on the cifsd package. I still want to try switch from external kerberos to internal heimdal, if that works i will do a 18.x backport PR unless 19.x is just around the corner.

I think you can consider 18.X branch dead by now most likely

As far as packages in general goes I still think makes a lot more sense to do quarterly "releases"/forks/syncs as the faillog for 18.X is huge compared to master and there are (unsurprisingly) users noticing that numerous packages are failing. Just sayin'.....

https://downloads.openwrt.org/releases/faillogs/mipsel_24kc/packages/ vs https://downloads.openwrt.org/snapshots/faillogs/mipsel_24kc/packages/

ok, but a few i checked all have the same invalid fail, so this is still a problem.
time: package/feeds/packages/krb5/compile#0.05#0.00#0.25

Hi Andy2244! I used your package builder to get samba4 AD DC on my router. I gotta say: the script is very well done! However I encountered one problem trying to get samba-tool working.
When I run it I get this python error:

root@openwrt:~# samba-tool
Traceback (most recent call last):
  File "/usr/bin/samba-tool", line 33, in <module>
    from samba.netcmd.main import cmd_sambatool
  File "/usr/lib/python2.7/site-packages/samba/__init__.py", line 28, in <module>                                     
    import ldb
ImportError: No module named ldb

It seems that this module that is missing is ought to provide bindings for ldb database module.
I have failed to find this python module anywhere in both official feeds and your own.
Maybe you might be able to point me to the right direction in solving this?
P.S. I'm on 18.06.2 currently.