s.s.p.PDB : class documentation

Part of samba.samba3.passdb View In Hierarchy

PDB(url[, read_write_flags]) -> Password DB object
Method set_trusteddom_pw set_trusteddom_pw(domain, pwd, sid) -> None
Method del_groupmem del_groupmem(group_rid, member_rid) -> None
Method gid_to_sid gid_to_sid(gid) -> sid
Method delete_group_mapping_entry delete_group_mapping_entry(groupmap) -> None
Method enum_group_members enum_group_members(group_sid) -> List
Method delete_user delete_user(samu object) -> None
Method create_user create_user(username, acct_flags) -> rid
Method add_sam_account add_sam_account(samu object) -> None
Method set_secret set_secret(secret_name, Mapping) -> None
Method create_dom_group create_dom_group(groupname) -> group_rid
Method create_alias create_alias(alias_name) -> alias_rid
Method get_secret get_secret(secret_name) -> Mapping
Method rename_sam_account rename_sam_account(samu object1, new_username) -> None
Method uid_to_sid uid_to_sid(uid) -> sid
Method delete_sam_account delete_sam_account(samu object) -> None
Method delete_alias delete_alias(alias_sid) -> None
Method __new__ T.__new__(S, ...) -> a new object with type S, a subtype of T
Method search_users search_users(acct_flags) -> List
Method update_sam_account update_sam_account(samu object) -> None
Method set_trusted_domain set_trusted_domain(domain, Mapping) -> None
Method get_account_policy get_account_policy() -> Mapping
Method get_aliasinfo get_aliasinfo(alias_sid) -> Mapping
Method set_account_policy get_account_policy(Mapping) -> None
Method del_trusted_domain del_trusted_domain(domain) -> None
Method enum_trusted_domains enum_trusted_domains() -> List
Method get_trusted_domain_by_sid get_trusted_domain_by_sid(domain_sid) -> Mapping
Method enum_trusteddoms enum_trusteddoms() -> List
Method del_trusteddom_pw del_trusteddom_pw(domain) -> None
Method add_aliasmem add_aliasmem(alias_sid, member_sid) -> None
Method domain_info domain_info() -> str
Method getsampwsid getsampwsid(user_sid) -> samu object
Method search_aliases search_aliases([domain_sid]) -> List
Method getgrgid getgrsid(gid) -> groupmap object
Method enum_aliasmem enum_aliasmem(alias_sid) -> List
Method set_aliasinfo set_alias_info(alias_sid, Mapping) -> None
Method delete_secret delete_secret(secret_name) -> None
Method sid_to_id sid_to_id(sid) -> Tuple
Method add_groupmem add_groupmem(group_rid, member_rid) -> None
Method get_trusted_domain get_trusted_domain(domain) -> Mapping
Method delete_dom_group delete_dom_group(group_rid) -> None
Method del_aliasmem del_aliasmem(alias_sid, member_sid) -> None
Method getgrsid getgrsid(group_sid) -> groupmap object
Method update_group_mapping_entry update_group_mapping_entry(groupmap) -> None
Method get_trusteddom_pw get_trusteddom_pw(domain) -> Mapping
Method add_group_mapping_entry add_group_mapping_entry(groupmap) -> None Add group mapping entry for groupmap object.
Method search_groups search_groups() -> List
Method getgrnam getgrsid(groupname) -> groupmap object
Method getsampwnam getsampwnam(username) -> samu object
Method new_rid new_rid() -> rid
Method enum_group_mapping enum_group_mapping([domain_sid, [type, [unix_only]]]) -> List
def set_trusteddom_pw():
set_trusteddom_pw(domain, pwd, sid) -> None

Set trusted domain password.

def del_groupmem():
del_groupmem(group_rid, member_rid) -> None

Remove user from from group.

def gid_to_sid():
gid_to_sid(gid) -> sid

Return sid for given group id.

def delete_group_mapping_entry():
delete_group_mapping_entry(groupmap) -> None

Delete group mapping entry for groupmap object.

def enum_group_members():
enum_group_members(group_sid) -> List

Return list of users (dom_sid object) in group.

def delete_user():
delete_user(samu object) -> None

Delete user.

def create_user():
create_user(username, acct_flags) -> rid

Create user. acct_flags are samr account control flags.

def add_sam_account():
add_sam_account(samu object) -> None

Add SAM account.

def set_secret():
set_secret(secret_name, Mapping) -> None

Set secret information for secret_name using dictionary with keys - secret_current, sd.

def create_dom_group():
create_dom_group(groupname) -> group_rid

Create new domain group by name.

def create_alias():
create_alias(alias_name) -> alias_rid

Create alias entry.

def get_secret():
get_secret(secret_name) -> Mapping

Get secret information for secret_name. Information is a dictionary with keys - secret_current, secret_current_lastchange, secret_old, secret_old_lastchange, sd.

def rename_sam_account():
rename_sam_account(samu object1, new_username) -> None

Rename SAM account.

def uid_to_sid():
uid_to_sid(uid) -> sid

Return sid for given user id.

def delete_sam_account():
delete_sam_account(samu object) -> None

Delete SAM account.

def delete_alias():
delete_alias(alias_sid) -> None

Delete alias entry.

def __new__():
T.__new__(S, ...) -> a new object with type S, a subtype of T
def search_users():
search_users(acct_flags) -> List

Search users. acct_flags are samr account control flags. Each list entry is dictionary with keys - idx, rid, acct_flags, account_name, fullname, description.

def update_sam_account():
update_sam_account(samu object) -> None

Update SAM account.

def set_trusted_domain():
set_trusted_domain(domain, Mapping) -> None

Set trusted domain information for domain. Mapping is a dictionary with keys - domain_name, netbios_name, security_identifier, trust_auth_incoming, trust_auth_outgoing, trust_direction, trust_type, trust_attributes, trust_forest_trust_info.

def get_account_policy():
get_account_policy() -> Mapping

Get account policy information as a dictionary.

def get_aliasinfo():
get_aliasinfo(alias_sid) -> Mapping

Get alias information as a dictionary with keys - acct_name, acct_desc, rid.

def set_account_policy():
get_account_policy(Mapping) -> None

Set account policy settings from a dicionary.

def del_trusted_domain():
del_trusted_domain(domain) -> None

Delete trusted domain.

def enum_trusted_domains():
enum_trusted_domains() -> List

Get list of trusted domains. Each entry is a dictionary with keys - domain_name, netbios_name, security_identifier, trust_auth_incoming, trust_auth_outgoing, trust_direction, trust_type, trust_attributes, trust_forest_trust_info.

def get_trusted_domain_by_sid():
get_trusted_domain_by_sid(domain_sid) -> Mapping

Get trusted domain information by sid. Information is a dictionary with keys - domain_name, netbios_name, security_identifier, trust_auth_incoming, trust_auth_outgoing, trust_direction, trust_type, trust_attributes, trust_forest_trust_info

def enum_trusteddoms():
enum_trusteddoms() -> List

Get list of trusted domains. Each item is a dictionary with name and sid keys

def del_trusteddom_pw():
del_trusteddom_pw(domain) -> None

Delete trusted domain password.

def add_aliasmem():
add_aliasmem(alias_sid, member_sid) -> None

Add user to alias entry.

def domain_info():
domain_info() -> str

Get domain information for the database.

def getsampwsid():
getsampwsid(user_sid) -> samu object

Get user information by sid (dcerpc.security.dom_sid object).

def search_aliases():
search_aliases([domain_sid]) -> List

Search aliases. domain_sid is dcerpc.security.dom_sid object. Each list entry is dictionary with keys - idx, rid, acct_flags, account_name, fullname, description.

def getgrgid():
getgrsid(gid) -> groupmap object

Get group information by gid.

def enum_aliasmem():
enum_aliasmem(alias_sid) -> List

Return a list of members (dom_sid object) for alias entry.

def set_aliasinfo():
set_alias_info(alias_sid, Mapping) -> None

Set alias information from a dictionary with keys - acct_name, acct_desc.

def delete_secret():
delete_secret(secret_name) -> None

Delete secret information for secret_name.

def sid_to_id():
sid_to_id(sid) -> Tuple

Return id and type for given sid.

def add_groupmem():
add_groupmem(group_rid, member_rid) -> None

Add user to group.

def get_trusted_domain():
get_trusted_domain(domain) -> Mapping

Get trusted domain information by name. Information is a dictionary with keys - domain_name, netbios_name, security_identifier, trust_auth_incoming, trust_auth_outgoing, trust_direction, trust_type, trust_attributes, trust_forest_trust_info.

def delete_dom_group():
delete_dom_group(group_rid) -> None

Delete domain group identified by rid

def del_aliasmem():
del_aliasmem(alias_sid, member_sid) -> None

Remove a user from alias entry.

def getgrsid():
getgrsid(group_sid) -> groupmap object

Get group information by sid (dcerpc.security.dom_sid object).

def update_group_mapping_entry():
update_group_mapping_entry(groupmap) -> None

Update group mapping entry for groupmap object.

def get_trusteddom_pw():
get_trusteddom_pw(domain) -> Mapping

Get trusted domain password, sid and last set time in a dictionary.

def add_group_mapping_entry():
add_group_mapping_entry(groupmap) -> None Add group mapping entry for groupmap object.
def search_groups():
search_groups() -> List

Search unix only groups. Each list entry is dictionary with keys - idx, rid, acct_flags, account_name, fullname, description.

def getgrnam():
getgrsid(groupname) -> groupmap object

Get group information by name.

def getsampwnam():
getsampwnam(username) -> samu object

Get user information by name.

def new_rid():
new_rid() -> rid

Get a new rid.

def enum_group_mapping():
enum_group_mapping([domain_sid, [type, [unix_only]]]) -> List

Return list of group mappings as groupmap objects. Optional arguments are domain_sid object, type of group, unix only flag.

API Documentation for Samba, generated by pydoctor at 2012-03-06 23:17:58.