Part of samba.samdb View In Hierarchy
Method | __init__ | Opens a Samba Ldb file. |
Method | connect | connect to the database |
Method | am_rodc | return True if we are an RODC |
Method | am_pdc | return True if we are an PDC emulator |
Method | domain_dn | return the domain DN |
Method | disable_account | Disables an account |
Method | enable_account | Enables an account |
Method | toggle_userAccountFlags | toggle_userAccountFlags |
Method | force_password_change_at_next_login | Forces a password change at next login |
Method | newgroup | Adds a new group with additional parameters |
Method | deletegroup | Deletes a group |
Method | add_remove_group_members | Adds or removes group members |
Method | newuser | Adds a new user with additional parameters |
Method | deleteuser | Deletes a user |
Method | setpassword | Sets the password for a user |
Method | setexpiry | Sets the account expiry for a user |
Method | set_domain_sid | Change the domain SID used by this LDB. |
Method | get_domain_sid | Read the domain SID used by this LDB. |
Method | set_invocation_id | Set the invocation id for this SamDB handle. |
Method | get_invocation_id | Get the invocation_id id |
Method | get_oid_from_attid | Undocumented |
Method | get_attid_from_lDAPDisplayName | return the attribute ID for a LDAP attribute as an integer as found in DRSUAPI |
Method | get_syntax_oid_from_lDAPDisplayName | return the syntax OID for a LDAP attribute as a string |
Method | get_systemFlags_from_lDAPDisplayName | return the systemFlags for a LDAP attribute as a integer |
Method | get_linkId_from_lDAPDisplayName | return the linkID for a LDAP attribute as a integer |
Method | get_lDAPDisplayName_by_attid | return the lDAPDisplayName from an integer DRS attribute ID |
Method | get_backlink_from_lDAPDisplayName | return the attribute name of the corresponding backlink from the name of a forward link attribute. If there is no backlink return None |
Method | set_ntds_settings_dn | Set the NTDS Settings DN, as would be returned on the dsServiceName rootDSE attribute. |
Method | get_ntds_GUID | Get the NTDS objectGUID |
Method | server_site_name | Get the server site name |
Method | host_dns_name | return the DNS name of this host |
Method | domain_dns_name | return the DNS name of the domain root |
Method | forest_dns_name | return the DNS name of the forest root |
Method | load_partition_usn | Undocumented |
Method | set_schema | Undocumented |
Method | set_schema_from_ldb | Undocumented |
Method | dsdb_DsReplicaAttribute | convert a list of attribute values to a DRSUAPI DsReplicaAttribute |
Method | dsdb_normalise_attributes | normalise a list of attribute values |
Method | get_attribute_from_attid | Get from an attid the associated attribute |
Method | get_attribute_replmetadata_version | Get the version field trom the replPropertyMetaData for the given field |
Method | set_attribute_replmetadata_version | Undocumented |
Method | write_prefixes_from_schema | Undocumented |
Method | get_partitions_dn | Undocumented |
Method | set_minPwdAge | Undocumented |
Method | get_minPwdAge | Undocumented |
Method | set_minPwdLength | Undocumented |
Method | get_minPwdLength | Undocumented |
Method | set_pwdProperties | Undocumented |
Method | get_pwdProperties | Undocumented |
Method | set_dsheuristics | Undocumented |
Method | get_dsheuristics | Undocumented |
Method | create_ou | No summary |
Method | sequence_number | Returns the value of the sequence number according to the requested type :param seq_type: type of sequence number |
Method | get_dsServiceName | get the NTDS DN from the rootDSE |
Method | get_serverName | get the server DN from the rootDSE |
Method | _populate_oid_attid | Populate the hash hash_oid_name. |
Inherited from Ldb:
Method | searchone | Search for one attribute as a string. |
Method | erase_users_computers | Erases user and computer objects from our AD. |
Method | erase_except_schema_controlled | Erase this ldb. |
Method | erase | Erase this ldb, removing all records. |
Method | load_ldif_file_add | Load a LDIF file. |
Method | add_ldif | Add data based on a LDIF string. |
Method | modify_ldif | Modify database based on a LDIF string. |
This is different from a regular Ldb file in that the Samba-specific modules-dir is used by default and that credentials and session_info can be passed through (required by some modules).
Parameters | url | Optional LDB URL to open |
lp | Optional loadparm object | |
modules_dir | Optional modules directory | |
session_info | Optional session information | |
credentials | Optional credentials, defaults to anonymous. | |
flags | Optional LDB flags | |
options | Additional options (optional) |
Parameters | search_filter | LDAP filter to find the user (eg samccountname=name) |
Parameters | search_filter | LDAP filter to find the user (eg samccountname=name) |
Parameters | search_filter | LDAP filter to find the user (eg samccountname=name) |
Unknown Field: flags | samba.dsdb.UF_* flags | |
Unknown Field: on | on=True (default) => set, on=False => unset | |
Unknown Field: strict | strict=False (default) ignore if no action is needed strict=True raises an Exception if... |
Parameters | search_filter | LDAP filter to find the user (eg samccountname=name) |
Parameters | groupname | Name of the new group |
grouptype | Type of the new group | |
description | Description of the new group | |
mailaddress | Email address of the new group | |
notes | Notes of the new group | |
sd | security descriptor of the object |
Parameters | groupname | Name of the target group |
listofmembers | Comma-separated list of group members | |
add_members_operation | Defines if its an add or remove operation |
Parameters | username | Name of the new user |
password | Password for the new user | |
force_password_change_at_next_login_req | Force password change | |
useusernameascn | Use username as cn rather that firstname + initials + lastname | |
userou | Object container (without domainDN postfix) for new user | |
surname | Surname of the new user | |
givenname | First name of the new user | |
initials | Initials of the new user | |
profilepath | Profile path of the new user | |
scriptpath | Logon script path of the new user | |
homedrive | Home drive of the new user | |
homedirectory | Home directory of the new user | |
jobtitle | Job title of the new user | |
department | Department of the new user | |
company | Company of the new user | |
description | of the new user | |
mailaddress | Email address of the new user | |
internetaddress | Home page of the new user | |
telephonenumber | Phone number of the new user | |
physicaldeliveryoffice | Office location of the new user | |
sd | security descriptor of the object | |
setpassword | optionally disable password reset |
Parameters | search_filter | LDAP filter to find the user (eg samccountname=name) |
password | Password for the user | |
force_change_at_next_login | Force password change |
Parameters | search_filter | LDAP filter to find the user (eg samaccountname=name) |
expiry_seconds | expiry time from now in seconds | |
no_expiry_req | if set, then don't expire password |
Parameters | sid | The new domain sid to use. |
Parameters | invocation_id | GUID of the invocation id. |
This allows the DN to be set before the database fully exists
Parameters | ntds_settings_dn | The new DN to use |
Parameters | attid | The attribute id for searched attribute |
Returns | The name of the attribute associated with this id |
This hash contains the oid of the attribute as a key and its display name as a value
Parameters | dn | The on which we want to get the version |
att | The name of the attribute | |
Returns | The value of the version field in the replPropertyMetaData for the given attribute. None if the attribute is not replicated |