From patchwork Mon May 11 16:55:51 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adolf Belka X-Patchwork-Id: 9820 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail01.haj.ipfire.org", Issuer "R12" (not verified)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4gDm7x541Zz3wk8 for ; Mon, 11 May 2026 16:55:57 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [IPv6:2001:678:b28::201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519) (Client CN "mail02.haj.ipfire.org", Issuer "E8" (not verified)) by mail01.ipfire.org (Postfix) with ESMTPS id 4gDm7x46kJz6p9 for ; Mon, 11 May 2026 16:55:57 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4gDm7x3KzGz2xp0 for ; Mon, 11 May 2026 16:55:57 +0000 (UTC) X-Original-To: development@lists.ipfire.org Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (secp384r1 raw public key) server-digest SHA384 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail01.haj.ipfire.org", Issuer "R12" (not verified)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4gDm7v00tbz2xPX for ; Mon, 11 May 2026 16:55:54 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4gDm7t2Zdcz5mC; Mon, 11 May 2026 16:55:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1778518554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=3Mpue3KjeU8toQVPwPe2SDL9STCRjdRWmO6sVBjlWP0=; b=nXZLlJpVzmvyziHwoKi44ojIjXpdvKm8TF7ZGHdNDg7ADR+Ke7gtrtSY2GBKlaxeXV/ad6 BaPjhTi8f/xdVc8kkHH0h7Gw38kaIxu32DqgJZqeIUdUPzrlMBxZYQyCOgJ7Ie0yM8UAc1 sxAyA975BrL3jerkNuSLdi45FjTw4EJN1Eo9Dzs1sYwo4voX4k88nQwSfynCCAq62786mz dXeiVNf2LgQSuigN/i5wTkVdVEMfVCZV5rDSKWLZPSPQ2EKLZvlRJmgv8tTKjBHLYF7NM5 43DmwwLkZt7xVGRO2vWomxjSwn13hnsbwWB64Tl2UihEnJ/PwnW619ellGwL0w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1778518554; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=3Mpue3KjeU8toQVPwPe2SDL9STCRjdRWmO6sVBjlWP0=; b=21tMaEUWfRZQRwZAYPR+uWE4PjzIJR4Qk2BT7iA+7DKAzAX99sUeLYD8WYpBWBo4Pia8eE QwAbMoxPA51vCzBg== From: Adolf Belka To: development@lists.ipfire.org Cc: Adolf Belka Subject: [PATCH] backup.pl: Create the new unbound user and group when doing a restore Date: Mon, 11 May 2026 18:55:51 +0200 Message-ID: <20260511165551.197587-1-adolf.belka@ipfire.org> Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: MIME-Version: 1.0 - With the introduction of the unbound user and group, when a restore is done from a earlier backup when user and group nobody were used then the unbound user and group are removed as passwd and group are backed up. - Using the entry already present for the dhcpcd user and group I cre4ated this patch. - Not 100% certain it is the correct way to do it, as I am not sure about if a restore is done where the unbound user and group already exist but presumably the same effect occurs with the dhcpcd user and group. Signed-off-by: Adolf Belka --- config/backup/backup.pl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/backup/backup.pl b/config/backup/backup.pl index 9a54b50d3..8dd77b3ee 100644 --- a/config/backup/backup.pl +++ b/config/backup/backup.pl @@ -108,6 +108,14 @@ restore_backup() { -s /bin/false \ -u 52 dhcpcd + # create unbound user + groupadd -g 103 unbound + useradd -c 'unbound User' \ + -d /var/empty \ + -g unbound \ + -s /bin/false \ + -u 103 unbound + # Run converters # Outgoing Firewall