public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
* [PATCH] backup.pl: Create the new unbound user and group when doing a restore
@ 2026-05-11 16:55 Adolf Belka
  2026-05-11 17:57 ` Michael Tremer
  0 siblings, 1 reply; 2+ messages in thread
From: Adolf Belka @ 2026-05-11 16:55 UTC (permalink / raw)
  To: development; +Cc: Adolf Belka

- 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] backup.pl: Create the new unbound user and group when doing a restore
  2026-05-11 16:55 [PATCH] backup.pl: Create the new unbound user and group when doing a restore Adolf Belka
@ 2026-05-11 17:57 ` Michael Tremer
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Tremer @ 2026-05-11 17:57 UTC (permalink / raw)
  To: Adolf Belka; +Cc: development

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
> 
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-11 17:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-11 16:55 [PATCH] backup.pl: Create the new unbound user and group when doing a restore Adolf Belka
2026-05-11 17:57 ` Michael Tremer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox