users

package
v1.129.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2026 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ensure

func Ensure(exec executor.Executor, distro *detect.DistroInfo, log *logging.Logger) error

Ensure creates all NFTBan system users and groups idempotently.

Creates (in order):

  1. system groups: nftban, nftban-auditor, nftban-panel, suricata
  2. nftban system user (primary group: nftban, home: /var/lib/nftban, shell: nologin)
  3. adds root to the nftban group (for config-read access)

Idempotent: each step skips creation if the entity already exists. Safe to run on hosts where package installs previously created the same entities.

Returns an error only if a creation command fails on a missing entity. Distro dispatch uses distro.ID (normalized by detect.DetectDistro).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL