bbb-record --check fails because of missing user/group

Open
#396 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
docker, shell

Research direction

Read mod/recordings/Dockerfile around lines 19-46 and the referenced bigbluebutton-config/bin/bbb-record around line 54. Reproduce the missing user/group behavior with the Debian trixie image or rebuild the recording image, then determine which proposed change prevents bbb-record from failing when UID/GID 998 is occupied. Done means the image builds and bbb-record handles that user/group conflict.

Written by the indexing model from the issue text.

Description

As the user/groupid 998 is already taken by systemd-network i'm guessing the user couldn't be created on build-time?

From what i could make out this happens due to the installation of systemd in the image before adding the static user/group with the id 998.

# getent passwd |grep systemd-network
systemd-network:x:998:998:systemd Network Management:/:/usr/sbin/nologin

https://github.com/bigbluebutton/docker/blob/d38784bc848ea19c72f02c9c9acb91dbe44ad7ce/mod/recordings/Dockerfile#L19-L46

You can check this behaviour with the following in a clean trixie-image.
e.g. podman run -ti --name trixie --hostname trixie --network host debian:trixie /bin/bash

# the grep is used to lower the noise
root@trixie-12:/# apt-get -U install wget subversion rsync build-essential libsystemd-dev python3 python3-attr python3-cairo python3-gi python3-gi-cairo python3-lxml python3-icu python3-pyinotify python3-sortedcollections python3-packaging gir1.2-pangocairo-1.0 gir1.2-poppler-0.18 gir1.2-gtk-3.0 gir1.2-gdkpixbuf-2.0 fonts-croscore ffmpeg poppler-utils imagemagick supervisor unzip locales locales-all -o apt::install-recommends=0 --assume-no | grep --colour systemd
  libopenjp2-7 libopenmpt0t64 libopus0 libp11-kit0 libpam-systemd
  libsvtav1enc2 libswresample5 libswscale8 libsystemd-shared libtasn1-6
  rpcsvc-proto shared-mime-info systemd systemd-sysv x11-common xkb-data
  subversion-tools supervisor-doc systemd-container systemd-homed
  systemd-userdbd systemd-boot systemd-resolved systemd-repart
  python3-bs4 python3-cssselect python3-html5lib systemd-timesyncd
  | time-daemon systemd-cryptsetup libnss-systemd
  libopenjp2-7 libopenmpt0t64 libopus0 libp11-kit0 libpam-systemd
  libsvtav1enc2 libswresample5 libswscale8 libsystemd-dev libsystemd-shared
  rpcsvc-proto rsync shared-mime-info subversion supervisor systemd
  systemd-sysv unzip wget x11-common xkb-data xz-utils

I added the -o apt::install-recommends=0 to see if it would already skip it but sadly not. Tho in general any application is working w/o installing recommends other than in some edge cases or "desktop-environment" nonsense 🙊

I haven't tried it myself to rebuild the whole thing but you could add the string systemd- to end of the apt-get install ... command or some place in there which will prevent installing systemd in the image.
If it's not used at all from any image than you could probably live without it or not? And it will also reduce the size of the images 🙈

root@trixie-12:/# apt-get -U install wget subversion rsync build-essential libsystemd-dev python3 python3-attr python3-cairo python3-gi python3-gi-cairo python3-lxml python3-icu python3-pyinotify python3-sortedcollections python3-packaging gir1.2-pangocairo-1.0 gir1.2-poppler-0.18 gir1.2-gtk-3.0 gir1.2-gdkpixbuf-2.0 fonts-croscore ffmpeg poppler-utils imagemagick supervisor unzip locales locales-all -o apt::install-recommends=0 --assume-no systemd- | grep --colour systemd
Package 'systemd' is not installed, so not removed
  dbus-user-session libpam-systemd pinentry-gnome3 tor debian-keyring
  libsvtav1enc2 libswresample5 libswscale8 libsystemd-dev libtasn1-6

On the other hand one could just modify bbb-record instead???

https://github.com/bigbluebutton/bigbluebutton/blob/8ffb970e020b96e990f9ed0c6ad6debf7c3b554b/bigbluebutton-config/bin/bbb-record#L54

So maybe running this at the end of image-creation? e.g.

root@meet /opt/docker/bbb-docker (git)-[main] # grep BBB_USER= /tmp/bbb-record
declare -r BBB_USER=bigbluebutton
root@meet /opt/docker/bbb-docker (git)-[main] # sed 's|BBB_USER=bigbluebutton|BBB_USER="$(id -n -u 998)"|' /tmp/bbb-record |grep BBB_USER=
declare -r BBB_USER="$(id -n -u 998)"
Dominant language
Shell
Stars
435
Forks
274
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bigbluebutton/docker

All issues in bigbluebutton/docker

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.