From aa0dc6693137bba82cb41a086284780e7f38a793 Mon Sep 17 00:00:00 2001 From: "Arnout Vandecappelle (Essensium/Mind)" Date: Sat, 5 Feb 2022 23:23:31 +0100 Subject: [PATCH] docs/manual/makeusers-syntax.txt: add caveat for upgrading With the change of the range of UIDs that is generated from the automatic ID (-1), it became apparent that there is a potential problem with these automatic IDs when upgrading: they may have changed, which means that persistent files that exist outside of the rootfs suddenly have a different owner. Add a caveat section to the manual, as well as an explanation of how to work around the problem. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) [yann.morin.1998@free.fr: slight rewording] Signed-off-by: Yann E. MORIN (cherry picked from commit 8b512056381e53deb2ea5e3228643ef6422c51bf) Signed-off-by: Peter Korsgaard --- docs/manual/makeusers-syntax.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/manual/makeusers-syntax.txt b/docs/manual/makeusers-syntax.txt index 3d1013f447..0a955970b3 100644 --- a/docs/manual/makeusers-syntax.txt +++ b/docs/manual/makeusers-syntax.txt @@ -90,3 +90,16 @@ This will create this user: - +shell+ is: +/bin/sh+ - +test+ is not a member of any additional +groups+ - +comment+ is: +Test user+ + + +=== Caveat with automatic UIDs and GIDs + +When updating buildroot or when packages are added or removed to/from +the configuration, it is possible that the automatic UIDs and GIDs are +changed. This can be a problem if persistent files were created with +that user or group: after upgrade, they will suddenly have a different +owner. + +Therefore, it is advisable to perpetuate the automatic IDs. This can be +done by adding a users table with the generated IDs. It is only needed +to do this for UIDs that actually create persistent files, e.g. database.