From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.haj.ipfire.org (localhost [IPv6:::1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 4gDnWY3lgDz32yr for ; Mon, 11 May 2026 17:58:01 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [IPv6:2001:678:b28::25]) (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 mail02.haj.ipfire.org (Postfix) with ESMTPS id 4gDnWV1w06z2xHh for ; Mon, 11 May 2026 17:57:58 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 4gDnWT3L0qz6gH; Mon, 11 May 2026 17:57:57 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1778522277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6eJNE0wUoWypoYGdM+xnbonxyDpiwmliq+yCqP7QOCo=; b=TuPea5keujyLUipNy1+4yY60cLH1FNLbeadW5KZxFLNMz3IQ15FoyT6IBLPBctpwOy+vOk 4/4d9Vfw7HuvGABQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1778522277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=6eJNE0wUoWypoYGdM+xnbonxyDpiwmliq+yCqP7QOCo=; b=mvOmmC0BP1d/zp+NKMnkMw0zV9TwsCWrQ50lSOrs2D+mIpnzxdZ4+QPIE7B5loIMk+YT11 pAqnQ1GDE/HdAiHhG5zUKZOwLXkrjCwqJ2Ss8J1dwdFlLR/JN96T+hlPxG/vrTHF4FM0jd 7AZHi9BLzcTLMKX6DJ3u7IETGDEVVSMM7jDtizcjUnRse6ZnllRlzPsJ/v0vTVUckIA6kN ViOoCs2wVlcyOGvWTHqq56HLjrXRFb+yUAep0OV9uIQ8g7ZZRubh5nkV2QHZnY/5dnci2h NC0n5WspM9t861POpqX/0fIUdhtHtIBHMVs7Bn0stdnLqkw9vMu68xgH4xPWMw== Content-Type: text/plain; charset=us-ascii Precedence: list List-Id: List-Subscribe: , List-Unsubscribe: , List-Post: List-Help: Sender: Mail-Followup-To: Mime-Version: 1.0 Subject: Re: [PATCH] backup.pl: Create the new unbound user and group when doing a restore From: Michael Tremer In-Reply-To: <20260511165551.197587-1-adolf.belka@ipfire.org> Date: Mon, 11 May 2026 18:57:56 +0100 Cc: development@lists.ipfire.org Content-Transfer-Encoding: quoted-printable Message-Id: <48BAC698-D306-47E7-8B0E-7E6C75E50B42@ipfire.org> References: <20260511165551.197587-1-adolf.belka@ipfire.org> To: Adolf Belka 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 wrote: >=20 > - 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. >=20 > Signed-off-by: Adolf Belka > --- > config/backup/backup.pl | 8 ++++++++ > 1 file changed, 8 insertions(+) >=20 > 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 >=20 > + # create unbound user > + groupadd -g 103 unbound > + useradd -c 'unbound User' \ > + -d /var/empty \ > + -g unbound \ > + -s /bin/false \ > + -u 103 unbound > + > # Run converters >=20 > # Outgoing Firewall > --=20 > 2.54.0 >=20 >=20