Package easyLDAP :: Module easyLDAP_defaults
[frames] | no frames]

Source Code for Module easyLDAP.easyLDAP_defaults

  1  # -*- coding: utf-8 -*- 
  2   
  3  #    easyLDAP - a python library that makes LDAP management easier than before... 
  4  #    Copyright (C) 2004-2010,2020 Mike Gabriel <m.gabriel@das-netzwerkteam.de> 
  5  # 
  6  #    This program is free software: you can redistribute it and/or modify 
  7  #    it under the terms of the GNU General Public License as published by 
  8  #    the Free Software Foundation, either version 3 of the License, or 
  9  #    (at your option) any later version. 
 10  # 
 11  #    This program is distributed in the hope that it will be useful, 
 12  #    but WITHOUT ANY WARRANTY; without even the implied warranty of 
 13  #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 14  #    GNU General Public License for more details. 
 15  # 
 16  #    You should have received a copy of the GNU General Public License 
 17  #    along with this program.  If not, see <http://www.gnu.org/licenses/>. 
 18  # 
 19   
 20  """ 
 21  Default settings for easyLDAP. 
 22  """ 
 23   
 24  import pprint 
 25   
 26  # charater transformation 
 27  _invalidIA5map = { 
 28      u'\xe4':'ae', 
 29      u'\xc4':'Ae', 
 30      u'\xf6':'oe', 
 31      u'\xd6':'Oe', 
 32      u'\xfc':'ue', 
 33      u'\xdc':'Ue', 
 34      u'\xdf':'ss', 
 35  } 
 36   
 37  try: 
 38      EASY_LDAP 
 39  except NameError: 
 40      EASY_LDAP = {} 
 41      """ 
 42      EASY_LDAP contains all the easyLDAP default values. Before calling an  
 43      easyLDAP_* constructor, make sure EASY_LDAP contains all the information 
 44      needed to contact your LDAP server. 
 45      """ 
 46   
 47  EASY_LDAP['URI'] = 'ldap://localhost' 
 48  EASY_LDAP['RootDSE'] = 'dc=localdomain' 
 49  EASY_LDAP['BaseDN'] = EASY_LDAP['RootDSE'] 
 50  EASY_LDAP['AdminRDN'] = 'cn=admin' 
 51  EASY_LDAP['PeopleRDN'] = 'ou=people' 
 52  EASY_LDAP['GroupsRDN'] = 'ou=groups' 
 53  EASY_LDAP['HostsRDN'] = 'ou=hosts' 
 54  EASY_LDAP['MailAliasesRDN'] = 'ou=mailaliases' 
 55  EASY_LDAP['AutomountRDN'] = 'ou=automount' 
 56   
 57  ### DEPRECATED VARS 
 58  EASY_LDAP['ServerCharsetEncoding'] = 'utf-8' 
 59  EASY_LDAP['ForceLocaleCharsetEncoding'] = '' 
 60  EASY_LDAP['ExcludeFromCharsetEncoding'] = ['jpegPhoto','photo','audio'] 
 61  ### END OF DEPRECATED ### 
 62   
 63  EASY_LDAP['SizeLimit'] = 0 
 64  EASY_LDAP['CacheHistorySize'] = 50 
 65  EASY_LDAP['preferredAttributeAliases'] = { 
 66      '0.9.2342.19200300.100.1.1':'uid', 
 67      '2.5.4.3':'cn', 
 68      '2.5.4.11':'ou', 
 69      '2.5.4.10':'o', 
 70      '2.5.4.6':'c', 
 71      '2.5.4.4':'sn', 
 72  } 
 73   
 74  EASY_LDAP['BindDN'] = '' 
 75  EASY_LDAP['BindPW'] = '' 
 76   
 77  EASY_LDAP['posix_availableUidNumbers'] = {} 
 78  EASY_LDAP['posix_availableUidNumbers']['min'] = 60000 
 79  EASY_LDAP['posix_availableUidNumbers']['max'] = 62999 
 80  EASY_LDAP['posix_availableGidNumbers'] = {} 
 81  EASY_LDAP['posix_availableGidNumbers']['min'] = 63000 
 82  EASY_LDAP['posix_availableGidNumbers']['max'] = 63999 
 83   
 84  EASY_LDAP['Template_ACCOUNT'] = { 
 85      'objectClass':['top', 'account',], 
 86      'uid':['nobody',], 
 87  } 
 88  EASY_LDAP['Template_HOST'] = { 
 89      'objectClass':['top', 'ipHost',], 
 90      'cn':['nogroup',], 
 91      'ipHostNumber':['0.0.0.0',], 
 92  } 
 93  EASY_LDAP['Template_GROUP'] = { 
 94      'objectClass':['top', 'groupOfNames',], 
 95      'cn':['nogroup',], 
 96      'member':['cn=nobody',], 
 97  } 
 98   
 99  # the version is set in easyLDAP_version.py 
100  EASY_LDAP['version'] = '' 
101  # the exceptions are set in easyLDAP_exceptions.py (and can be expanded in your personal config... 
102  EASY_LDAP['exceptions'] = {} 
103   
113   
114  if __name__=='__main__': 
115      pass 
116