"""Disables an account
:param search_filter: LDAP filter to find the user (eg
- samccountname=name)
+ sAMAccountName=name)
"""
flags = samba.dsdb.UF_ACCOUNTDISABLE
"""Enables an account
:param search_filter: LDAP filter to find the user (eg
- samccountname=name)
+ sAMAccountName=name)
"""
flags = samba.dsdb.UF_ACCOUNTDISABLE | samba.dsdb.UF_PASSWD_NOTREQD
"""Toggle_userAccountFlags
:param search_filter: LDAP filter to find the user (eg
- samccountname=name)
+ sAMAccountName=name)
:param flags: samba.dsdb.UF_* flags
:param on: on=True (default) => set, on=False => unset
:param strict: strict=False (default) ignore if no action is needed
"""Forces a password change at next login
:param search_filter: LDAP filter to find the user (eg
- samccountname=name)
+ sAMAccountName=name)
"""
res = self.search(base=self.domain_dn(), scope=ldb.SCOPE_SUBTREE,
expression=search_filter, attrs=[])
"""Sets the password for a user
:param search_filter: LDAP filter to find the user (eg
- samccountname=name)
+ sAMAccountName=name)
:param password: Password for the user
:param force_change_at_next_login: Force password change
"""
"""Sets the account expiry for a user
:param search_filter: LDAP filter to find the user (eg
- samaccountname=name)
+ sAMAccountName=name)
:param expiry_seconds: expiry time from now in seconds
:param no_expiry_req: if set, then don't expire password
"""