I know this question has already been asked a few times quite similar.
And this answer could probably help me a lot: change user 'peter' to 'paul'
But I am afraid of experimentation in this case. So I better ask before that.
How reinstall (K)Ubuntu with different user-name without losing right to read my backuped data (produced daily with Back_in_Time) from my Data-HDD?
I think I really screwed my computer up and I'm pretty sure that reinstalling is my only option (strange errors like e.g. invisible GUIs.
Over time I have created an SH script which installs almost everything later automatically. Therefore installing the tools and apps later should probably not be a very big problem.
I think it might be a good opportunity to finally use a better username.
Linux file permissions and ownership are actually defined by the UID (User ID) and not the actual username. The username itself is just there to help make it user readable. If you run
sudo grep $USER /etc/passwd
you will see a line like the following:The above shows my UID as
1000
. Which means that as long as my username has a UID of1000
I will be able to see my files.When you install Ubuntu for the first time on the computer it defaults to UID 1000 for the first user created when you type in the username you want.
If you run
ls -n
in your home folder you will see something like the following:The above shows that all the files and folders in my home directory are owned by my UID.
So, if you reinstall your OS and as long as your new username has a matching UID, you shouldn't have any issues being able to read your backed up data as long as its permissions and ownership match your existing UID. You also can also create the user manually to have that UID if you need with the following command:
Hope this helps!