| Message ID | 20260511165551.197587-1-adolf.belka@ipfire.org |
|---|---|
| State | Accepted |
| Commit | da1960a8f38d1a1d1ae5855703b8f60432389f1e |
| Headers |
Return-Path: <development+bounces-2131-patchwork=ipfire.org@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) (Client CN "mail01.haj.ipfire.org", Issuer "R12" (not verified)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 4gDm7x541Zz3wk8 for <patchwork@web04.haj.ipfire.org>; 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 <patchwork@ipfire.org>; 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 <patchwork@ipfire.org>; 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 <development@lists.ipfire.org>; 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 <adolf.belka@ipfire.org> To: development@lists.ipfire.org Cc: Adolf Belka <adolf.belka@ipfire.org> 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: <development.lists.ipfire.org> List-Subscribe: <https://lists.ipfire.org/>, <mailto:development+subscribe@lists.ipfire.org?subject=subscribe> List-Unsubscribe: <https://lists.ipfire.org/>, <mailto:development+unsubscribe@lists.ipfire.org?subject=unsubscribe> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development+help@lists.ipfire.org?subject=help> Sender: <development@lists.ipfire.org> Mail-Followup-To: <development@lists.ipfire.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit |
| Series |
backup.pl: Create the new unbound user and group when doing a restore
|
|
Commit Message
Adolf Belka
11 May 2026, 4:55 p.m. UTC
- 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 <adolf.belka@ipfire.org>
---
config/backup/backup.pl | 8 ++++++++
1 file changed, 8 insertions(+)
Comments
Hello Adolf, Thanks for the patch, but I am not sure whether we strictly need it. Maybe we need it for a reason I am not aware of. So if someone restores a backup from an older version, the new user should already exist as we create it in the updater. Nothing to do during the restore. If someone is taking a backup created on c202 and takes it back to lets say c199, then there is no Unbound user and the files have the wrong ownership but there is nothing we can do about it. All the best, -Michael > On 11 May 2026, at 17:55, Adolf Belka <adolf.belka@ipfire.org> wrote: > > - 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 <adolf.belka@ipfire.org> > --- > 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 > -- > 2.54.0 > >
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