Skip to main content

Module users

Module users 

Source
Expand description

Container user management operations

This module provides functions to manage Linux system users inside the running Docker container. opencode authenticates against PAM, so opencode-cloud must manage system users in the container.

Security note: Passwords are never passed as command arguments. Instead, we use chpasswd which reads from stdin.

Structs§

UserInfo
Information about a container user

Functions§

create_user
Create a new user in the container
delete_user
Delete a user from the container
list_users
List users in the container with home directories
lock_user
Lock a user account (disable password authentication)
set_user_password
Set or change a user’s password
unlock_user
Unlock a user account (re-enable password authentication)
user_exists
Check if a user exists in the container