univention.s4connector package#
- univention.s4connector.set_ucs_passwd_user(connector, key, ucs_object)[source]#
set random password to fulfill required values
- univention.s4connector.check_ucs_lastname_user(connector, key, ucs_object)[source]#
check if required values for lastname are set
- univention.s4connector.set_primary_group_user(connector, key, ucs_object)[source]#
check if correct primary group is set
- class univention.s4connector.RFC4514_dn[source]#
Bases:
object- special_dn_chars = '"+,;<=>'#
- pattern = '(\\\\")|(\\\\\\+)|(\\\\,)|(\\\\;)|(\\\\<)|(\\\\=)|(\\\\>)'#
- match = re.compile('(\\\\")|(\\\\\\+)|(\\\\,)|(\\\\;)|(\\\\<)|(\\\\=)|(\\\\>)')#
- substs = ['\\22', '\\2B', '\\2C', '\\3B', '\\3C', '\\3D', '\\3E']#
- replace()#
- class univention.s4connector.attribute(ucs_attribute='', ldap_attribute='', con_attribute='', con_other_attribute='', required=0, single_value=False, compare_function=None, mapping=(), reverse_attribute_check=False, sync_mode='sync', con_attribute_encoding='UTF-8', auto_enable_udm_option=False)[source]#
Bases:
objectA mapping attribute description
- Parameters:
ucs_attribute (str) – The property name of the object in UDM
ldap_attribute (str) – The LDAP attribute name of the object in UCS LDAP
con_attribute (str) – The LDAP attribute name of the object in AD LDAP
con_other_attribute (str) – Further LDAP attribute name of the object in AD LDAP.
required (bool) – unused
single_value (bool) – Whether the attribute is single_value in the AD LDAP.
compare_function (callable) – A comparison function which compares raw ldap attribute values.
mapping – Mapping functions for (sync_to_s4, sync_to_ucs)
reverse_attribute_check – Make a reverse check of this mapping, if the mapping is not 1:1.
sync_mode – The syncronization direction (read, write, sync)
- Ptype mapping:
tuple
- Ptype reverse_attribute_check:
bool
- Ptype sync_mode:
str
- class univention.s4connector.property(ucs_default_dn='', con_default_dn='', ucs_module='', ucs_module_others=[], sync_mode='', scope='', con_search_filter='', ignore_filter=None, match_filter=None, ignore_subtree=[], con_create_objectclass=[], con_create_attributes=[], dn_mapping_function=[], attributes=None, ucs_create_functions=[], con_create_extensions=[], post_con_create_functions=[], post_con_modify_functions=[], post_ucs_modify_functions=[], post_attributes=None, mapping_table=None, position_mapping=[], con_sync_function=None, ucs_sync_function=None, disable_delete_in_ucs=False, identify=None, con_subtree_delete_objects=[])[source]#
Bases:
object
- class univention.s4connector.ucs(CONFIGBASENAME, _property, configRegistry, listener_dir, logfilename, debug_level)[source]#
Bases:
object- search_ucs(filter='(objectClass=*)', base='', scope='sub', attr=[], unique=0, required=0, timeout=-1, sizelimit=0)[source]#
- poll_ucs()[source]#
poll changes from UCS: iterates over files exported by directory-listener module
- sync_to_ucs(property_type, object, pre_mapped_s4_dn, original_object)[source]#
Synchronize an object from Samba4-LDAP to UCS Open-LDAP.
- Parameters:
property_type – the type of the object to be synced, must be part of the mapping. (e.g. “user”, “group”, “dc”, “windowscomputer”, etc.)
object – A dictionary describing the Samba object. modtype: A modification type (“add”, “modify”, “move”, “delete”) dn: The DN of the object in the UCS-LDAP olddn: The olddn of the object object in UCS-LDAP (e.g. on “move” operation)
pre_mapped_s4_dn – pass
original_object – pass
- Ptype object:
dict
Subpackages#
- univention.s4connector.s4 package
group_members_sync_from_ucs()object_memberships_sync_from_ucs()group_members_sync_to_ucs()object_memberships_sync_to_ucs()primary_group_sync_from_ucs()primary_group_sync_to_ucs()disable_user_from_ucs()disable_user_to_ucs()add_primary_group_to_addlist()check_for_local_group_and_extend_serverctrls_and_sid()fix_dn_in_search()fix_dn()str2dn()unix2s4_time()s42unix_time()samba2s4_time()s42samba_time()samaccountname_dn_mapping()user_dn_mapping()group_dn_mapping()windowscomputer_dn_mapping()dc_dn_mapping()decode_sid()compare_sid_lists()LDAPEscapeFormatterformat_escaped()s4s4.RANGE_RETRIEVAL_PATTERNs4.main()s4.init_ldap_connections()s4.init_group_cache()s4.s4_search_ext_s()s4.open_s4()s4.get_lastUSN()s4.list_rejected()s4.save_rejected()s4.remove_rejected()s4.addToCreationList()s4.removeFromCreationList()s4.isInCreationList()s4.get_object_dn()s4.parse_range_retrieval_attrs()s4.value_range_retrieval()s4.get_s4_members()s4.get_object()s4.set_primary_group_to_ucs_user()s4.primary_group_sync_from_ucs()s4.primary_group_sync_to_ucs()s4.object_memberships_sync_from_ucs()s4.group_members_sync_from_ucs()s4.object_memberships_sync_to_ucs()s4.one_group_member_sync_to_ucs()s4.one_group_member_sync_from_ucs()s4.group_members_sync_to_ucs()s4.disable_user_from_ucs()s4.disable_user_to_ucs()s4.initialize()s4.resync_rejected()s4.poll()s4.sync_from_ucs()s4.delete_in_s4()
- Submodules
- univention.s4connector.s4.computer module
- univention.s4connector.s4.dc module
- univention.s4connector.s4.dns module
PTRRecordMXRecorddns_dn_mapping()s4_zone_create()s4_zone_msdcs_sync()s4_zone_create_wrapper()s4_zone_delete()s4_dns_node_base_create()s4_dns_node_base_delete()s4_host_record_create()ucs_host_record_create()ucs_host_record_delete()s4_ptr_record_create()ucs_ptr_record_create()ucs_ptr_record_delete()ucs_cname_create()ucs_cname_delete()s4_cname_create()ucs_srv_record_create()ucs_srv_record_delete()s4_srv_record_create()ucs_txt_record_create()ucs_txt_record_delete()s4_txt_record_create()ucs_ns_record_create()ucs_ns_record_delete()s4_ns_record_create()ucs_zone_create()ucs_zone_delete()ucs2con()con2ucs()
- univention.s4connector.s4.main module
- univention.s4connector.s4.mapping module
- univention.s4connector.s4.ntsecurity_descriptor module
- univention.s4connector.s4.password module
- univention.s4connector.s4.query_config module
- univention.s4connector.s4.sid_mapping module
- univention.s4connector.s4.user module
Submodules#
univention.s4connector.lockingdb module#
- class univention.s4connector.lockingdb.LockingDB(filename)[source]#
Bases:
objectA local database which includes the list of objects which are currently locked. That means the synchronisation of these objects has not been finished. https://forge.univention.org/bugzilla/show_bug.cgi?id=35391