Bug #6857
closedlocal_sync_accounts fails during boot when using ldap on a non-local network or hostname
100%
Description
Hi,
When using an LDAP server on a non-local (ie. accesible thru a gateway) network, the system takes 10+ minutes to boot, due to errors trying to access ldap during startup:
Oct 16 02:18:35 fw-ext-2 php-cgi: rc.bootup: ERROR! ldap_get_groups() could not bind to server LDAP (SRE). Oct 16 02:19:37 fw-ext-2 php-cgi: rc.bootup: ERROR! ldap_get_groups() could not bind to server LDAP (SRE). Oct 16 02:20:38 fw-ext-2 php-cgi: rc.bootup: ERROR! ldap_get_groups() could not bind to server LDAP (SRE). Oct 16 02:21:40 fw-ext-2 php-cgi: rc.bootup: ERROR! ldap_get_groups() could not bind to server LDAP (SRE). Oct 16 02:22:42 fw-ext-2 php-cgi: rc.bootup: ERROR! ldap_get_groups() could not bind to server LDAP (SRE). Oct 16 02:23:44 fw-ext-2 php-cgi: rc.bootup: ERROR! ldap_get_groups() could not bind to server LDAP (SRE). Oct 16 02:27:52 fw-ext-2 php-cgi: rc.bootup: ROUTING: setting default route to 10.75.48.30 Oct 16 02:27:52 fw-ext-2 kernel: done. Oct 16 02:27:52 fw-ext-2 php-cgi: rc.bootup: ROUTING debug: 0.22204300 1476577672 - /sbin/route change -inet '192.168.0.0/16' 10.75.48.62 Oct 16 02:27:52 fw-ext-2 php-cgi: rc.bootup: ROUTING debug: 0.22371900 1476577672 - /sbin/route change -inet '10.0.0.0/8' 10.75.48.62
From inspecting /etc/rc.boot it looks like the following call to local_sync_accounts() requires networking (& routes) to be setup already:
echo "Synchronizing user settings..."; local_sync_accounts(); echo "done.\n";
So IMHO we should move the following code before invoking 'local_sync_accounts':
/* set up static routes */ system_routing_configure();
And we may want to enable dnsmasq/unbound before local_sync_accounts too, as we may need those services running in order to resolve LDAP servers' hostname.
PR Updated by Pablo Ruiz almost 10 years ago
I've just sent a pull-req: https://github.com/pfsense/pfsense/pull/3194
JT Updated by Jim Thompson almost 10 years ago
- Assignee set to Renato Botelho
RB Updated by Renato Botelho almost 10 years ago
- Subject changed from local_sync_accounts fails during boot when using ldap on a non-local network to local_sync_accounts fails during boot when using ldap on a non-local network or hostname
- Target version set to 2.4.0
- Affected Version set to All
If ldap server is configured using hostname and it depends of local DNS resolver it also fails
RB Updated by Renato Botelho almost 10 years ago
- Status changed from New to Confirmed
RB Updated by Renato Botelho almost 10 years ago
- Status changed from Confirmed to Feedback
- % Done changed from 0 to 100
Applied in changeset commit:4c6135c288444be99fbf18915e0e09d1d865ae25.
JP Updated by Jim Pingle over 9 years ago
- Status changed from Feedback to Resolved
Works, no failures or delays when booting with a remote LDAP server.
JP Updated by Jim Pingle over 9 years ago
- Category set to User Manager / Privileges
- Target version changed from 2.4.0 to 2.3.3