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

Module easyLDAP_bind

source code

Functions
 
easyLDAP_setDefaultCredentials(bind_dn, bind_pw=None, config_defaults={'AdminRDN': 'cn=admin', 'AutomountRDN': 'ou=automount', 'Base...)
easyLDAP_setDefaultCredentials('myDN', 'myPW')
source code
 
easyLDAP_setDefaultBindCredentials(bind_pw=None, config_defaults={'AdminRDN': 'cn=admin', 'AutomountRDN': 'ou=automount', 'Base...)
easyLDAP_setDefaultBindCredentials('myPW')
source code
 
easyLDAP_setDefaultAdminCredentials(bind_pw=None, config_defaults={'AdminRDN': 'cn=admin', 'AutomountRDN': 'ou=automount', 'Base...)
easyLDAP_setDefaultAdminCredentials('myAdminPW')
source code
 
easyLDAP_defaultBind(INSTANCE)
binds the given object to the LDAP server.
source code
 
easyLDAP_defaultBind_norefresh(INSTANCE)
binds the given object to the LDAP server.
source code
 
easyLDAPsetDefaultCredentials(bind_dn, bind_pw=None, config_defaults={'AdminRDN': 'cn=admin', 'AutomountRDN': 'ou=automount', 'Base...)
easyLDAP_setDefaultCredentials('myDN', 'myPW')
source code
 
easyLDAPsetDefaultBindCredentials(bind_pw=None, config_defaults={'AdminRDN': 'cn=admin', 'AutomountRDN': 'ou=automount', 'Base...)
easyLDAP_setDefaultBindCredentials('myPW')
source code
 
easyLDAPsetDefaultAdminCredentials(bind_pw=None, config_defaults={'AdminRDN': 'cn=admin', 'AutomountRDN': 'ou=automount', 'Base...)
easyLDAP_setDefaultAdminCredentials('myAdminPW')
source code
 
easyLDAPdefaultBind(INSTANCE)
binds the given object to the LDAP server.
source code
 
easyLDAPdefaultBind_norefresh(INSTANCE)
binds the given object to the LDAP server.
source code
Variables
  EASY_LDAP = {'AdminRDN': 'cn=admin', 'AutomountRDN': 'ou=autom...
  __package__ = 'easyLDAP'
Function Details

easyLDAP_setDefaultCredentials(bind_dn, bind_pw=None, config_defaults={'AdminRDN': 'cn=admin', 'AutomountRDN': 'ou=automount', 'Base...)

source code 

easyLDAP_setDefaultCredentials('myDN', 'myPW')

sets the easyLDAP default value dictionary entries as
follows:

  EASY_LDAP['BindDN'] = 'myDN'
  EASY_LDAP['BindPW'] = 'myPW'

Now you can call the functions

  easyLDAPdefaultBind(obj)
  easyLDAPdefaultBind_norefresh(obj)

and the bind process will be performed automagically
with the default values.

If 'myPW' is not specified, you will be prompted for it
on STDOUT/STDIN.

easyLDAP_setDefaultBindCredentials(bind_pw=None, config_defaults={'AdminRDN': 'cn=admin', 'AutomountRDN': 'ou=automount', 'Base...)

source code 

easyLDAP_setDefaultBindCredentials('myPW')

sets the easyLDAP default value dictionary entries as
follows:

  EASY_LDAP['BindDN'] = 'myDN'
  EASY_LDAP['BindPW'] = 'myPW'

Now you can call the functions

  easyLDAPdefaultBind(obj)
  easyLDAPdefaultBind_norefresh(obj)

and the bind process will be performed automagically
with the default values.

If 'myPW' is not specified, you will be prompted for it
on STDOUT/STDIN.

easyLDAP_setDefaultAdminCredentials(bind_pw=None, config_defaults={'AdminRDN': 'cn=admin', 'AutomountRDN': 'ou=automount', 'Base...)

source code 

easyLDAP_setDefaultAdminCredentials('myAdminPW')

sets the easyLDAP default value dictionary entries as
follows:

  EASY_LDAP['BindDN'] = config_defaults['AdminRDN']+','+
                        config_defaults['BaseDN']
  EASY_LDAP['BindPW'] = 'myAdminPW'

Now you can call the functions

  easyLDAPdefaultBind(my_easyLDAPobject)
  easyLDAPdefaultBind_norefresh(my_easyLDAPobject)

and the administrative bind process will be performed
automagically with these default values.

If 'myAdminPW' is not specified and EASY_LDAP['BindPW']
contains an empty string, a password dialog will be
initiated on STDIN/STDOUT. This dialog can be forced
by passing a non-string as 'myAdminPW' (e.g. explicitly:
None).

easyLDAP_defaultBind(INSTANCE)

source code 

binds the given object to the LDAP server. This helper function requires the dictionary entry EASY_LDAP['BindDN'] to be set.

If so, it will check the dict entry EASY_LDAP['BindPW'] for a non empty string. If so, it will bind the given easyLDAP object with the standard credentials, defined by the named dictionary entries. If the bind password is not globally specified, the function will ask for the password at the command line.

This function uses refreshes the easyLDAP object's cache. The result of the binding method will be returned by this function.

easyLDAP_defaultBind_norefresh(INSTANCE)

source code 

binds the given object to the LDAP server. This helper function requires the dictionary entry EASY_LDAP['BindDN'] to be set.

If so, it will check the dict entry EASY_LDAP['BindPW'] for a non-empty string. If so, it will bind the given easyLDAP object with the standard credentials, defined by the named dictionary entries. If the bind password is not globally specified, the function will ask for the password at the command line.

This function does _NOT_ refresh the easyLDAP object's cache. Some values of the original LDAP object might be missing in the easyLDAP object cache as a consequence of restrictions of the previously used credentials.

The result of the binding method will be returned by this function.

easyLDAPsetDefaultCredentials(bind_dn, bind_pw=None, config_defaults={'AdminRDN': 'cn=admin', 'AutomountRDN': 'ou=automount', 'Base...)

source code 

easyLDAP_setDefaultCredentials('myDN', 'myPW')

sets the easyLDAP default value dictionary entries as
follows:

  EASY_LDAP['BindDN'] = 'myDN'
  EASY_LDAP['BindPW'] = 'myPW'

Now you can call the functions

  easyLDAPdefaultBind(obj)
  easyLDAPdefaultBind_norefresh(obj)

and the bind process will be performed automagically
with the default values.

If 'myPW' is not specified, you will be prompted for it
on STDOUT/STDIN.

easyLDAPsetDefaultBindCredentials(bind_pw=None, config_defaults={'AdminRDN': 'cn=admin', 'AutomountRDN': 'ou=automount', 'Base...)

source code 

easyLDAP_setDefaultBindCredentials('myPW')

sets the easyLDAP default value dictionary entries as
follows:

  EASY_LDAP['BindDN'] = 'myDN'
  EASY_LDAP['BindPW'] = 'myPW'

Now you can call the functions

  easyLDAPdefaultBind(obj)
  easyLDAPdefaultBind_norefresh(obj)

and the bind process will be performed automagically
with the default values.

If 'myPW' is not specified, you will be prompted for it
on STDOUT/STDIN.

easyLDAPsetDefaultAdminCredentials(bind_pw=None, config_defaults={'AdminRDN': 'cn=admin', 'AutomountRDN': 'ou=automount', 'Base...)

source code 

easyLDAP_setDefaultAdminCredentials('myAdminPW')

sets the easyLDAP default value dictionary entries as
follows:

  EASY_LDAP['BindDN'] = config_defaults['AdminRDN']+','+
                        config_defaults['BaseDN']
  EASY_LDAP['BindPW'] = 'myAdminPW'

Now you can call the functions

  easyLDAPdefaultBind(my_easyLDAPobject)
  easyLDAPdefaultBind_norefresh(my_easyLDAPobject)

and the administrative bind process will be performed
automagically with these default values.

If 'myAdminPW' is not specified and EASY_LDAP['BindPW']
contains an empty string, a password dialog will be
initiated on STDIN/STDOUT. This dialog can be forced
by passing a non-string as 'myAdminPW' (e.g. explicitly:
None).

easyLDAPdefaultBind(INSTANCE)

source code 

binds the given object to the LDAP server. This helper function requires the dictionary entry EASY_LDAP['BindDN'] to be set.

If so, it will check the dict entry EASY_LDAP['BindPW'] for a non empty string. If so, it will bind the given easyLDAP object with the standard credentials, defined by the named dictionary entries. If the bind password is not globally specified, the function will ask for the password at the command line.

This function uses refreshes the easyLDAP object's cache. The result of the binding method will be returned by this function.

easyLDAPdefaultBind_norefresh(INSTANCE)

source code 

binds the given object to the LDAP server. This helper function requires the dictionary entry EASY_LDAP['BindDN'] to be set.

If so, it will check the dict entry EASY_LDAP['BindPW'] for a non-empty string. If so, it will bind the given easyLDAP object with the standard credentials, defined by the named dictionary entries. If the bind password is not globally specified, the function will ask for the password at the command line.

This function does _NOT_ refresh the easyLDAP object's cache. Some values of the original LDAP object might be missing in the easyLDAP object cache as a consequence of restrictions of the previously used credentials.

The result of the binding method will be returned by this function.


Variables Details

EASY_LDAP

Value:
{'AdminRDN': 'cn=admin',
 'AutomountRDN': 'ou=automount',
 'BaseDN': 'dc=localdomain',
 'BindDN': '',
 'BindPW': '',
 'CacheHistorySize': 50,
 'ExcludeFromCharsetEncoding': ['jpegPhoto', 'photo', 'audio'],
 'ForceLocaleCharsetEncoding': '',
...