tiredofit / docker-fusiondirectory

Dockerized web based LDAP manager
MIT License
48 stars 18 forks source link

Location of ldap.conf in 2.6.1 #36

Closed tobiasbp closed 3 years ago

tobiasbp commented 3 years ago

I 2.6.1 when running tool 'fusiondirectory-setup':

fusiondirectory-setup --check-ldap
! Failed to open ldap config file '/etc/ldap/ldap.conf': No such file or directory

The LDAP configuration file is here (Unknow to the FD tool):

/etc/openldap/ldap.conf

Fixable by adding a symlink from the dir expected by the fusiondirectory-setup to the actual dir:

ln -s /etc/openldap /etc/ldap

Config file to use, can be set like this:

fusiondirectory-setup --set-ldap_conf=/etc/openldap/ldap.conf  --check-ldap
Setting ldap_conf to /etc/openldap/ldap.conf
Checking your LDAP tree
Role cn=admin,ou=aclroles,ou=fd,dc=kontrapunkt,dc=com is an admin ACL role
uid=fd-admin,ou=people,ou=fd,dc=kontrapunkt,dc=com is a valid admin

It must be possible to change the default somewhere:

bash-4.4# fusiondirectory-setup --list-vars
List possible vars to give --set
fd_cache    [/var/cache/fusiondirectory]
fd_smarty_dir   [/usr/share/php/smarty3]
class_cache [class.cache]
ldap_conf   [/etc/ldap/ldap.conf]
fai_log_dir [fai]
template_dir    [template]
secrets_file    [fusiondirectory.secrets]
fd_home [/var/www/fusiondirectory]
config_file [fusiondirectory.conf]
fd_config_dir   [/etc/fusiondirectory]
locale_cache_dir    [locale]
tmp_dir [tmp]
locale_dir  [locale]
fd_spool_dir    [/var/spool/fusiondirectory]

Default is hardcoded:

grep "ldap\.conf" /usr/sbin/fusiondirectory-setup 
 ldap_conf        => "/etc/ldap/ldap.conf",

I guess adding the symlink is the best fix?

tiredofit commented 3 years ago

Thanks for this. I'm thinking a symlink is probably the best fix at this time as I also believe Argonaut is also tied to it. Once 1.4 is released I'll modify it in the source during building to point to the more recognized /etc/openldap folder. I'll push a fix right away.

tiredofit commented 3 years ago

Tagged as 2.6.2

tobiasbp commented 3 years ago

Thanks. Tested and working for me too.