models.user_id module

class models.user_id.UserId(sid=None, unix_uid=None)[source]

Bases: object

Implementation of the ‘UserId’ model.

Specifies the mapping between an Unix and an SMB SID.

Attributes:
sid (string): If interested in a user via smb_client, include SID.

Otherwise, If valid unix-id to SID mappings are available (i.e., when mixed mode is enabled) the server will perform the necessary id mapping and return the correct usage irrespective of whether the unix id / SID is provided. The string is of following format - S-1-IdentifierAuthority-SubAuthority1-SubAuthority2-…-SubAuthorit yn.

unix_uid (int): If interested in a user via unix-identifier, include

UnixUid. Otherwise, If valid unix-id to SID mappings are available (i.e., when mixed mode is enabled) the server will perform the necessary id mapping and return the correct usage irrespective of whether the unix id / SID is provided.

classmethod from_dictionary(dictionary)[source]

Creates an instance of this model from a dictionary

Args:

dictionary (dictionary): A dictionary representation of the object as obtained from the deserialization of the server’s response. The keys MUST match property names in the API description.

Returns:

object: An instance of this structure class.