Niels Erik
Dabbler
- Joined
- Aug 9, 2015
- Messages
- 18
What I would like to achieve is to use existing OpenLdap server to provide authentication to my Samba server on the TrueNas Core host
I have looked at the following:
I run a number of jails with Mailserver, NextCloud, bind, OpenLdap, reverse proxy etc.
I can get PAM, SSSD, NSS, SASL to interface with LDAP inside jails without problems.
But I can't get the only service that i run outside the jails (SAMBA file server) to use LDAP(S).
I know how to use ldapsearch, and getent inside jails.
I use certificates signed by a public CA (LetsEncrypt) but the TrueNas system itself does not face the internet. (My DNS provider does not support ACME, I have made my homemade solution to move certificates from internet facing reverse proxy to internal jails)
Since both the jails and the host is a kind of FreeBSD, i would like the most to generate a /usr/local/etc/ldap.conf with the LetsEncrypt CA via. the UI.
I have looked at this:
www.ixsystems.com
Filled out Base, and Bind DN. Password, check enable.
www.ixsystems.com
Imported LetsEncrypt CA.
Nothing happens, the list of users does not get populated as with 'getent passwd' in a jail.
The normal ldap configuration files does not exist on the system, like those:
2: Let SAMBA on TrueNas Core host use MIT Kerberos server in a jail. like FreeIPA
I have tried to reverse engineer a FreeIPA docker image (MIT Kerberos, Dogtag, Bind, Apache GUI + a lot more), to recreate it in a jail.
I have not got far with this, I have a basic kerberos up and running with DNS settings, but without integration with LDAP.
The FreeIPA docker image in itself i a pain in the but... Tried to run it on WSL2, Ubuntu, Redhat, but there is a regression problem..
3: Move samba server inside a jail (in norder to be free to edit config files)
Another rabbit hole...
I kind of have zfs working in a jail... Except that i first ran into this:
www.truenas.com
Then I tried to get samba up and running then I ran into this..
I have been contemplating editing iocage to support the missing property in the config.json.
I have looked at the following:
- Let SAMBA on TrueNas Core host use LDAP
- Let SAMBA on TrueNas Core host use MIT Kerberos server in a jail. like FreeIPA
- Move samba server inside a jail (in norder to be free to edit config files)
- Looking at Docker, and migration to Scale.
I run a number of jails with Mailserver, NextCloud, bind, OpenLdap, reverse proxy etc.
I can get PAM, SSSD, NSS, SASL to interface with LDAP inside jails without problems.
But I can't get the only service that i run outside the jails (SAMBA file server) to use LDAP(S).
I know how to use ldapsearch, and getent inside jails.
I use certificates signed by a public CA (LetsEncrypt) but the TrueNas system itself does not face the internet. (My DNS provider does not support ACME, I have made my homemade solution to move certificates from internet facing reverse proxy to internal jails)
Since both the jails and the host is a kind of FreeBSD, i would like the most to generate a /usr/local/etc/ldap.conf with the LetsEncrypt CA via. the UI.
I have looked at this:
12. Directory Services — FreeNAS®11.3-U5 User Guide Table of Contents
7. System — FreeNAS®11.3-U5 User Guide Table of Contents
Nothing happens, the list of users does not get populated as with 'getent passwd' in a jail.
The normal ldap configuration files does not exist on the system, like those:
# /usr/local/etc/openldap/ldap.conf is used by LDAPSEACH
# /usr/local/etc/ldap.conf is used by PAM
# /usr/local/etc/nss_ldap.conf is used by NSS
TLS_CACERT /usr/local/etc/ssl/acme/ca-root.pem
2: Let SAMBA on TrueNas Core host use MIT Kerberos server in a jail. like FreeIPA
I have tried to reverse engineer a FreeIPA docker image (MIT Kerberos, Dogtag, Bind, Apache GUI + a lot more), to recreate it in a jail.
I have not got far with this, I have a basic kerberos up and running with DNS settings, but without integration with LDAP.
The FreeIPA docker image in itself i a pain in the but... Tried to run it on WSL2, Ubuntu, Redhat, but there is a regression problem..
3: Move samba server inside a jail (in norder to be free to edit config files)
Another rabbit hole...
I kind of have zfs working in a jail... Except that i first ran into this:
Access .zfs snapshot from inside a jail
Hello, I have set snapshot folder visibility to yes on a data set. I then scheduled a periodic snapshot task to run on my dataset. I have then created a jail and mounted the dataset as a mount inside the jail. I then fire up the jail's ssh and navigate to the .zfs/snapshot folder and cannot...

Curiously, after I've created a new snapshot and do an ls -al /path/to/dataset/.zfs/snapshot (just ls does not help) from the base OS, I can access the new snapshot from jail.
Then I tried to get samba up and running then I ran into this..
Unfortunately iocage does not have an option to allow mount fdescfs. And according to this comment by Kris Moore, there is no plans in foreseeable future. I guess, I have to move to generic jails instead of iocage then.
I have been contemplating editing iocage to support the missing property in the config.json.