Skip to main content

Module user_manager

Module user_manager 

Source
Expand description

User Manager for start-command

Provides utilities for creating isolated users with the same group memberships as the current user. This enables true user isolation while preserving access to sudo, docker, and other privileged groups.

Structs§

CreateIsolatedUserOptions
Options for creating an isolated user
CreateUserOptions
Options for creating a user
DeleteUserOptions
Options for deleting a user
UserInfo
User information
UserOperationResult
Result of a user operation

Functions§

create_isolated_user
Create an isolated user with the same groups as the current user
create_user
Create a new user with specified groups Requires sudo access
delete_user
Delete a user and optionally their home directory Requires sudo access
generate_isolated_username
Generate a unique username for isolation
get_current_user
Get the current user’s username
get_current_user_groups
Get the groups the current user belongs to
get_user_info
Get information about a user
group_exists
Check if a group exists on the system
has_sudo_access
Check if the current process has sudo access without password
user_exists
Check if a user exists on the system