When installing RedHat7.0 using my /home-partition from a previous install,
several files in /home/fido (fido being my username) was destroyed. The
ones I have found so far is ".bashrc" and ".emacs". The default content of
these files seems to overwrite the beginning of the existing file. Most
likely leaving the file in an incorrect state, but more importantly:
destroying the contents at the beginning of the file.
Whichever program performs this step (adduser?) should not install a
default file when a file already exists, or at the very least, back up the
old file and create a new one.
Transferring to shadow-utils package, which contains adduser.
Did you select the option to create a user during installation?
Yes I did choose to create the user during installation.
Okay, so the account didn't exist (because the root partition was reformatted),
but shadow-utils overwrote configuration files because the home directory DID
exist, and it did so in a Very Bad way.
That's correct. I would suppose this happens for the rest of the files in
/etc/skel also, but I have only found problems with these two files so far.
*** Bug 29167 has been marked as a duplicate of this bug. ***
I looked at the shadow utils package - and the spec file seems to say that this
package hasn't been changed in a good while. Could you test this as a problem
with adduser by adding a user dir in /home then adding a username that matches
And see if it munges the files.
Please check if the shadow-utils-20000826-4 packages in
http://people.redhat.com/nalin/test/ fix this. User files should no longer be
overwritten if they exist when adding users. Files which are written are
truncated when opened, so you won't get the end of the original file tacked on
to the end of the new version of the file.
That package appears to fix the problem - the RC files are not overwritten or
Spoke too soon. There is still a problem. The dir is not chowned for the user.
So the user won't be able to mod the files - if the username is the same but the
uid has changed this will be a problem.
I'm thinking this would be reasonable to close out b/c it doesn't seem
like it's either
1. popped back up
2. going to matter.
if it happens again - open a new one, I think.