I already have root access since the computer is my personal property. It runs a recent version of a major Linux distribution. I want to create a new user that is an identical copy of an existing user, including all configurations and settings. The new user has already been added to the system. The step that is the focus of my question is copying all the files in the home directory. There are many files that have a string naming the username of the source user. I can programmatically edit the copies to name the new user. But, I am concerned about a big binary file
~/.config/dconf/user and any others that may be like it. One big issue is that the length of the usernames is different and that merely changing the username with a tool like
sed could easily corrupt the file.
There are no issues with user contributed files as these are known to not have any absolute user references. Paths referencing home directory files were all written with
~/ or just
~ for cases just like this. But many GUI application developers were not so wise.
Is there a resource that could list any more files that I need to know about and what tools I should use to modify these files to work under a new username?
I believe this problem would be similar to renaming a user but all I find online refers to the