View Issue Details

IDProjectCategoryView StatusLast Update
0011533Talermerchant backendpublic2026-06-17 16:02
Reportervecirex Assigned Tovecirex  
PrioritynoneSeveritytrivialReproducibilityalways
Status confirmedResolutionopen 
Summary0011533: Free taler-merchant-dbconfig from sudo
DescriptionGiven xBSD ports and even minimalistic Debian for podman (cf. output) which is without sudo, use su:

root@1b0bd36dc346:~# taler-merchant-dbconfig 
taler-merchant-dbinit v1.6.5
Setting up database user taler-merchant-httpd.
Database user 'taler-merchant-httpd' already existed. Continuing anyway.
/usr/bin/taler-merchant-dbconfig: line 91: sudo: command not found
Failed to grant permissions to taler-merchant-httpd
root@1b0bd36dc346:~# sudo
bash: sudo: command not found
root@1b0bd36dc346:~# 
Additional InformationWhen on computer with proper git access for this repo, I fix this right away.
Tagsxbsd

Activities

vecirex

2026-06-17 15:58

manager   ~0028933

Last edited: 2026-06-17 16:00

Sidetrack (stopping right away): runuser works perfectly fine on a minimalistic Debian in podman (like taler.hacktivism.ch) and is also more portable on Linux systems, but only there; would go like this (just tried out):

root@1b0bd36dc346:~# cat /usr/bin/taler-merchant-dbconfig  | grep runuser              
if ! runuser -u postgres -- createuser "$DBUSER" 2>/dev/null; then
runuser -u postgres -- psql -v dbuser="$DBUSER" <<'EOF' || ret=$?
if runuser -u postgres -- psql "$DBNAME" </dev/null 2>/dev/null; then
    if ! runuser -u postgres -- dropdb "$DBNAME"; then
  if ! runuser -u postgres -- createdb -O "$DBUSER" "$DBNAME"; then
  if ! runuser -u "$DBUSER" -- "$DBINIT" -c "$CFGFILE"; then
root@1b0bd36dc346:~# 

Issue History

Date Modified Username Field Change
2026-06-17 15:51 vecirex New Issue
2026-06-17 15:51 vecirex Status new => assigned
2026-06-17 15:51 vecirex Assigned To => vecirex
2026-06-17 15:58 vecirex Note Added: 0028933
2026-06-17 15:59 vecirex Description Updated
2026-06-17 16:00 vecirex Note Edited: 0028933
2026-06-17 16:01 vecirex Status assigned => confirmed
2026-06-17 16:02 vecirex Tag Attached: xbsd