Skip to content

Openhab user groups not added anymore #449

@TheNetStriker

Description

@TheNetStriker

Summary

In the latest image (4.2.3) the openhab user is not added to the additional groups anymore. This prevents the process from accessing the Zwave serial port.

Expected Behavior

Openhab user should receive additional groups again. (e.g. dialout group)

Current Behavior

I found the following error in the docker log:

Adding user `openhab' ...
Adding new user `openhab' (110) with group `openhab (115)' ...
useradd warning: openhab's uid 110 outside of the UID_MIN 1000 and UID_MAX 60000 range.

I guess that the newer debian version wants higher user id's.

Possible Solution

Assign higher user and group id's in the entrypoint script.

Steps to Reproduce

  1. Launch latest OpenHab version in docker.
  2. Check groups with command "groups openhab". It should list the following:
    openhab : openhab uucp dialout audio audio2 uucp2 dialout2 audio3 dialout3 uucp3 audio4 dialout4 audio5 gpio

Context

ZWave not working anymore. I had to revert to version 4.2.2.

Your Environment

OpenHab running on an Rasperry Pi 5 using Docker.

Image

  • openHAB version: 4.2.3
  • Image tag used: openhab/openhab:4.2.3

Docker Host

  • Operating System: Debian GNU/Linux 12 (bookworm)
  • Docker Version: 27.3.1
  • Kernel Version: 6.6.51+rpt-rpi-2712
  • Architecture: aarch64

Configuration

  openhab:
    image: openhab/openhab:4.2.3
    container_name: openhab
    restart: always
    devices:
      - /dev/serial/by-id/usb-0658_0200-if00:/dev/ttyZwave
    network_mode: host
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/timezone:/etc/timezone:ro
      - /opt/docker/openhab/openhab/addons:/openhab/addons
      - /opt/docker/openhab/openhab/config:/openhab/conf
      - /opt/docker/openhab/openhab/userdata:/openhab/userdata
    environment:
      - CRYPTO_POLICY=unlimited
      - EXTRA_JAVA_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=n
      - OPENHAB_HTTP_PORT=8080
      - OPENHAB_HTTPS_PORT=8443
      - USER_ID=110
      - GROUP_ID=115

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions