Doesn't need to be done only for toolbox and we will need this when we switch the user gitlab-ci runs as. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7816>
13 lines
276 B
Bash
13 lines
276 B
Bash
#! /bin/bash
|
|
|
|
set -eux
|
|
|
|
uid="10043"
|
|
name="containeruser"
|
|
groupadd $name -g $uid
|
|
useradd -u $uid -g $uid -ms /bin/bash $name
|
|
|
|
usermod -aG wheel $name || usermod -aG sudo $name
|
|
bash -c "echo $name ALL=\(ALL\) NOPASSWD:ALL > /etc/sudoers.d/$name"
|
|
chmod 0440 /etc/sudoers.d/$name
|