Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 19982 - Files in /home are destroyed during install
Files in /home are destroyed during install
Product: Red Hat Linux
Classification: Retired
Component: shadow-utils (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
Brock Organ
: Security
: 29167 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2000-10-29 02:58 EST by vidar
Modified: 2014-01-21 17:48 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-05-04 23:19:42 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description vidar 2000-10-29 02:58:21 EST
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.
Comment 1 Michael Fulbright 2000-10-31 10:40:44 EST
Transferring to shadow-utils package, which contains adduser.
Comment 2 Nalin Dahyabhai 2000-11-02 17:00:18 EST
Did you select the option to create a user during installation?
Comment 3 vidar 2000-11-02 17:13:40 EST
Yes I did choose to create the user during installation.
Comment 4 Nalin Dahyabhai 2000-11-02 17:16:39 EST
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.
Comment 5 vidar 2000-11-02 17:26:34 EST
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.
Comment 6 Nalin Dahyabhai 2001-03-09 01:50:16 EST
*** Bug 29167 has been marked as a duplicate of this bug. ***
Comment 7 Seth Vidal 2001-03-09 08:12:25 EST
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
that userdir.

And see if it munges the files.
Comment 8 Nalin Dahyabhai 2001-03-09 15:09:23 EST
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.
Comment 9 Seth Vidal 2001-03-09 22:47:48 EST
That package appears to fix the problem - the RC files are not overwritten or

Comment 10 Seth Vidal 2001-03-09 23:00:57 EST
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.

Comment 11 Alan Cox 2002-12-18 10:17:34 EST
Still present.
Comment 12 Seth Vidal 2004-05-04 23:19:42 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.