from .ldap_app import PpLdapAppError, PpLdapApplication
-__version__ = '0.4.4'
+__version__ = '0.4.5'
LOG = logging.getLogger(__name__)
query_filter = (
'(&(objectclass=posixAccount)(objectclass=shadowAccount)'
- '(uid={}))').format(uid)
- if self.verbose > 2:
+ '(inetuserstatus=active)(objectclass=pppixelaccount)'
+ '(!(ou=*Extern))(uid={}))').format(uid)
+ if self.verbose > 1:
LOG.debug("Query filter: {!r}".format(query_filter))
entries = self.ldap_search_subtree(person, query_filter)
- if self.verbose > 2:
+ if self.verbose > 1:
LOG.debug("Found {} LDAP entries.".format(len(entries)))
if entries:
if db_user['active'] != 1:
change_data['active'] = 1
+ if db_user['admin'] != 0:
+ change_data['admin'] = 0
+
sn = entry['sn'][0].strip()
fn = None
if entry['givenName'] and entry['givenName'][0]: