dissect.target.plugins.general.users#

Module Contents#

Classes#

UserDetails

UsersPlugin

Internal plugin that provides helper functions for retrieving user details.

class dissect.target.plugins.general.users.UserDetails#

Bases: NamedTuple

user: dissect.target.helpers.record.UnixUserRecord | dissect.target.helpers.record.WindowsUserRecord#
home_path: dissect.target.helpers.fsutil.TargetPath | None#
class dissect.target.plugins.general.users.UsersPlugin(target: dissect.target.Target)#

Bases: dissect.target.plugin.InternalPlugin

Internal plugin that provides helper functions for retrieving user details.

__namespace__ = 'user_details'#
check_compatible() None#

Perform a compatibility check with the target.

This function should return None if the plugin is compatible with the current target (self.target). For example, check if a certain file exists. Otherwise it should raise an UnsupportedPluginError.

Raises:

UnsupportedPluginError – If the plugin could not be loaded.

find(sid: str | None = None, uid: str | None = None, username: str | None = None, force_case_sensitive: bool = False) UserDetails | None#

Find User record matching provided sid, uid or username and return UserDetails object

get(user: dissect.target.helpers.record.UnixUserRecord | dissect.target.helpers.record.WindowsUserRecord) UserDetails#

Return additional details about the user

all() Generator[UserDetails, None, None]#

Return UserDetails objects for all users found

all_with_home() Generator[UserDetails, None, None]#

Return UserDetails objects for users that have existing directory set as home directory