dh_installsysusers - Linux


Overview

dh_installsysusers is a tool used in Debian package building to install system user and group accounts specified in the package’s debian/users file. These accounts are typically required for running the application or service associated with the Debian package.

Syntax

dh_installsysusers [--no-warn-override] [--clean] [--user USER] [--group GROUP]

Options/Flags

  • –no-warn-override: Suppresses warnings about overwriting existing system accounts.
  • –clean: Removes all system accounts and groups created by this command.
  • –user USER: Specifies the user account to be created or updated.
  • –group GROUP: Specifies the group account to be created or updated.

Examples

Create a user and group account:

dh_installsysusers --user myuser --group mygroup

Remove all system accounts and groups created by this command:

dh_installsysusers --clean

Update an existing user account:

dh_installsysusers --user myuser --no-warn-override

Common Issues

  • Error: No debian/users file found: Ensure that the Debian package includes a debian/users file specifying the system accounts and groups to be installed.
  • Error: Overwriting existing system account: Use the --no-warn-override option to suppress this warning and overwrite the existing account.

Integration

dh_installsysusers is typically called by the dh_auto_install command during Debian package building. It can also be manually executed to create or update system accounts and groups for specific applications or services.

Related Commands

  • dh_auto_install
  • dpkg
  • adduser
  • addgroup