A quick test can be found on the following link
https://notes.lubuntu.me/kYZJs5a3SimFpmP-Y2ZcVw
My purpose was primarily testing of @wxl’s
sudo find / -group 1001 -exec chgrp -h $USER {} \;
sudo find / -user 1000 -exec chown -h $USER {} \;
I had read Walter’s post yesterday & didn’t re-read it today (first), so my order was mucked up…
I ran the commands before I changed the GID to 1000, so a number of files were on logout still showing 1001 as GID; (I had featherpad
open for my notes, qterminal
for commands, plus firefox
to read this post; end-users will likely have firefox
[instructions they are following] & qterminal
open too
I logged out, then changed /etc/passwd
so GID was 1000, and on login again, everything appeared to work normally, created (touch
) files all had 1000/1000 I didn’t have any issues with the mainly .cache files which where GID=1001 (owner was still me)
I wasn’t sure why sudo find / -user 1000...
was needed, but did it too.
The main issue is how to document, and get users to perform it (those that need to, esp. changing $GID which wasn’t mentioned in Walter’s post).
Even with my failing to follow instructions (missing the per-requisite), as an end-user I’d consider it a success.
It’ll mean we have users at the 20.04->22.04.1 upgrade path with varying group settings of course…; but users are always changing things… so that’s not new. I’ll continue playing and looking for flaws.
Later edit: I’ll add, should a user have used my order, running the
sudo find / -group 1001 -exec chgrp -h $USER {} \;
a second time, on next login (after GID had changed) would have corrected the missed files (which weren’t actually missed; they just got re-changed by my in-use user account writing to them using the then-correct older GID settings).